On 1 Apr 2010, at 16:26, Jeff Schnitzer wrote:
On Thu, Apr 1, 2010 at 2:19 AM, John Patterson
<jdpatter...@gmail.com> wrote:
From a quick browse of the Objectify source code it looks to me
like the
default is to use Class.getSimpleName() for the kind name which
will also
break on renaming and doesn't even have the advantage of working
out-of-the-box with no registration.
This approach has quite a few advantages:
* It tends to be short
* You can repackage at will
* Even changing the classname is merely a question of adding
@Entity(name="OldName")
If Objectify users always register their classes explicitly, their
code will always work. Not "most of the time" or "for most queries"
but *all of the time*. It would be trivial to autoregister classes on
first explicit use, but it wouldn't work *all of the time*.
These advantages are also present with Twig (and presumably Slims
implementation?). The difference is one of defaults - you do not
*have* to register classes to get started with Twigs ObjectDatastore.
The defaults will just work.
To be clear, Twig *never* registers kind names for Classes on first
use. What it does do is cache reflective meta-data on first use as an
optimisation. But admittedly, this is hardly even relevant in the
context of an RPC call.
--
You received this message because you are subscribed to the Google Groups "Google
App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.