views:

461

answers:

2

Django has a very handy pattern known as "apps". Essentially, a self-contained plug-in that requires a minimal amount of wiring, configuring, and glue code to integrate into an existing project. Examples are tagging, comments, contact-form, etc. They let you build up large projects by gathering together a collection of useful apps, rather than writing everything from scratch. The apps you do end up writing can be made portable so you can recycle them in other projects.

Does this pattern exist in Google App Engine? Is there any way to create self-contained apps that can be easily be dropped into an App Engine project? Right off the bat, the YAML url approach looks like it could require a significant re-imagining to the way its done in Django.

Note: I know I can run Django on App Engine, but that's not what I'm interested in doing this time around.

+2  A: 

The Django implementation of apps is closely tied to Django operation as a framework - I mean plugging application using Django url mapping features (for mapping urls to view functions) and Django application component discovery (for discovering models and admin configuration). There is no such mechanisms in WebApp (I guess you think of WebApp framework when you refer to AppEngine, which is rather platform) itself - you have to write them by yourself then persuade people to write such applications in a way that will work with your url plugger and component discovery after plugging app to the rest of site code.

There are generic pluggable modules, ready to use with AppEngine, like sharded counters or GAE utilities library, but they do not provide such level of functionality like Django apps (django-registration for example). I thing this comes from much greater freedom of design (basically, on GAE you can model your app after Django layout or after any other you might think of) and lack of widely used conventions.

zgoda
+1  A: 

I'd like to add that you can run Django apps inside App Engine. I've been doing this successfully for the last few months. Basically, you can make use of the App Engine Helper project or App Engine Patcher. The App Engine Helper is maintained, in part, by google employees, so that's the one I use, thought the App Engine Patcher's maintainer is always feverishly promoting and updating his project (perhaps a little too much :)

Luis
I already noted the fact that you can run Django in app engine on the last line of my post. However, that's not really what I wanted to know.
Soviut