开发者

Hooking up Sproutcore frontend and custom Python backend

开发者 https://www.devze.com 2022-12-24 23:05 出处:网络
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 bes

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 (corr开发者_JAVA技巧ect 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


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消