views:

367

answers:

2

Hello everyone,

I am building a web-based application. The frontend has been designed in Sproutcore. For the backend, we have our own python API which handles all transactions with multiple databases. What is the best way to hook up the front-end with the back-end.

AFAIK django is pretty monolithic (correct me if i am wrong) and it would be cumbersome if I dont use its native ORM...I would prefer a python-based solution..any ideas?

thanks!

Suvir

+1  A: 

The only thing I know about sproutcore is what I read about 10 seconds ago to answer this. Javascript can do ajax so I assume so can sproutcore. So providing a restful api+json to your backend would be an option. If you need to sell it to your boss, call it a service oriented architecture. You'll probably have it working before he can look it up in this weeks Information Weekly.

All that's required for that to work is anything that can answer an http request and return json. There are a bizillion web frameworks out there that can do this. You mentioned one already and it will probably be mentioned again. I'll go ahead and state my preference though. bfg or pylons either of which will work for you and pretty much stay out of your way. There are others of course, and maybe after playing with them you might find you could write your own pretty easy either using just Webob (used by pylons and bfg and others) or straight wsgi OR a combination of all of them using pieces where appropriate according to your needs.

Tom Willis
Thanks a lot, CherryPy seems to do all I need for now. Will check out bottle.py as Pydroid suggested.
Suvir
+1  A: 

There's also Bottle.py if you just want it simple.

Pydroid