views:

44

answers:

2

App Engine provides a way to set the current "namespace". Is this a way to be able to easily reference variables, and thus not always have to insert database lookups in one's code?

+3  A: 

Not quite.

Namespacing is useful when you have an appengine app that you want to deploy to serve discrete groups data. You can read more about it here.

With namespacing, you partition your appengine app's stuff (datastore, memcache, and taskqueue) into a bunch of separate groups where data, row keys, tasks, etc, don't cross-contaminate or have name/key collisions.

mote
Nice answer. Welcome to SO!
Tim McNamara
huh, ok. thanks!
ehfeng
Thanks Tim! I figured I'd spent enough time lurking and I was long overdue to start giving back to the community =)
mote
+1  A: 

No. Namespaces are intended to make it easier to segment your datastore (etc.).

It is particular useful if your app servers multiple organizations, but each organizations' data should be completely separate. This simplifies your code, and may also help app engine scale your app too. Read more this in the documentation on an Overview of Multitenancy.

David Underhill