On 1 Apr 2010, at 16:20, Jeff Schnitzer wrote:

1) I vehemently disagree that fully-qualified java class names should
show up in the datastore.  It's one of those things that nobody
notices at the beginning and then becomes cruft that is difficult to
change sometime later.  Ask any DBA what they think of creating tables
named "com.mycompany.project.component.entity.MyEntity" - and it's
*way* easier to change table names on an RDBMS than it is in GAE.

One string is pretty much as good as another as long as it is unique for a class. Whether you "like" that string is of secondary importance to supporting the goal of zero-configuration

2) As you note, long kind names will significantly increase your
storage requirements.  Full package paths in the kind name are just a
bad idea.

They are un-optimised. Optimise them later when your app or prototype is running and its time to tune performance. Personally, about half of my data models explicitly define their kind name. The rest either are not present in such large numbers to impact storage or have not been renamed.

3) If you rename your class (or use a shorter name), you will need to
register your entities ahead of time.  That is, if you want
polymorphic queries to work.

Yes. That is assuming you want to keep the data that was stored with the old kind name. During development/prototyping this is not always the case.

So... you've avoided registration in the simple, un-shortened case
(which you don't recommend)

Exactly.  The simple case is not optimised.

You call registration "premature optimization", I call it
"planning ahead".

Different goals. Working out-of-the-box with no configuration is one of the basic features of the using the ObjectDatastore.




--
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to