Django + GAE (Google App Engine) : most convenient path for a beginner?
Some background info first:
- Goal: a medium-level complexity web app that I will need to maintain and possibly extend for a few years.
- Experience: good knowledge of python, some experience of MVC frameworks (in PHP).
- Desiderata: using django and google app engine.
I read extensively about the compatibility issues between GAE and Django, and I am aware of the GAE patch, the norel project, and other similar pieces of code. I have also understood that the SDK provides some of the features of django "out of the box".
Yet, given that I have no previous experience with neither Django nor GAE, I am unable to evaluate to which extent using a patched version of Django will strip away important features, or how far the framework provided in the SDK is compatible with Django. So I am rather confused on what would be the best way to proceed in my situation:
- Should I simply use a patched version of 开发者_JS百科Django as the differences with the original Django are so minor that I would hardly notice them?
- Should I write my app completely in "regular django" and try to port it to GAE only afterwards, when I will have got a grasp on Django internals and philosophy?
- Should I write my app using the framework provided with the SDK and port it to django only afterwards?
- Should I... ?
Thank you in advance for your time and advice.
I'm not sure if Django is a good fit for you. Django is a great framework for standalone applications because it provides a full stack solution: an ORM, authentication system and an admin interface, to name a few. You won't be able to use any of these on App Engine. Furthermore, many of the code samples are geared towards using the built in Webapp framework - you can very easily set cache expiration and authentication settings in app.yaml for configuration.
I see one of two paths for you:
- Learn App Engine with Webapp. There's enough to learn about using the datastore and App Engine's services that'll keep you busy.
- Learn Django off App Engine. You'll learn a lot about using Django's ORM, Admin goodies, URL routing, Forms and templates
By trying to learn both at the same time, you'll spend more time than you need learning the nuances of Django/GAE compatibility, time you could be spending either learning Django or GAE.
精彩评论