views:

365

answers:

1

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 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.

+4  A: 

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.

Ikai Lan
@Ikai Lan - Thanks for your input! (+1). So, why is people actually interested in using django on top of GAE if there is so much that does not work? (I mean: what's the advantage in using it?)
mac
There are a few:- Django has a more robust URL routing scheme than Webapp- Django forms are nice- Internationalization - I'm fairly certain webapp/templates does not deal with localization out of the boxThose are the ones I can think of off the top of my header.
Ikai Lan
@mac If you have written a few ten thousand lines of code for Django it is easier to port Django to app engine (with all its issues) than to port your app directly to some other framework. I think starting a new project with Django on app engine is not a good idea. But for legacy projects it might get you out of bunch of operational issues.
mdorseif