SimpleDS' api is closer than the others to what I want, but here's
what I don't like:

 * Not enough use of generics.  Key, Query, and PreparedQuery should
all be generified classes.

 * Key should not be used as the id for a class.  The class itself
identifies the Kind, so having a Key id carries redundant information
that can be incorrect and cause problems.  This becomes really obvious
when you generify the key class:

// Isn't that redundant?
class MyEntity {
    @Id OKey<MyEntity> key;
}

// This is what I expect to be able to do:
class MyEntity {
    @Id Long id;
}

Having an id field instead of a key makes queries easier.  With
Objectify, you can create a query without needing to know that the id
is part of a key field:

query.filter("id >", 5000).sort("-id")

This doesn't mean that the Key class should be hidden - the Key is
defines a _reference_ to an entity.  This means that get() takes a key
and all relationship fields should be Keys.  Thus, IMHO entities
should look like this:

class MyEntity {
    @Id Long id;
    @Parent OKey<ParentEntity> owner;
    OKey<Peer> somethingElse;
    List<OKey<Child>> children;   // if you want multi-valued
}

 * Sometimes I want to use entity objects in GWT without having to
create separate data transfer objects.  Any reference to the datastore
Key class prevents this from being possible.  Objectify entities are
GWT-safe (unless you add non-GWT-safe code, of course) and the OKey
class is GWT-compileable in the objectify.jar.  If your entity has
OKey fields, just add this module:

<inherits name="com.googlecode.Objectify" />

Reminds me, I should add this to the documentation.

 * I don't like the way SimpleDS (or the low level API) makes you pass
around a Transaction object.  By maintaining the transaction within an
instance of the Objectify/EntityManager/whatever interface, we can
eliminate all the API method duplication.

 * Classpath scanning shouldn't be required.  I wrote a bit about this
here: 
http://code.google.com/p/objectify-appengine/wiki/BestPractices#Automatic_Scanning.
 The short version:  Each and every library that does classpath
scanning adds 3-5s to your cold start time.  Users see cold start
time, even on a busy app.  It adds up.

 * I don't use (or like) Spring.

All that said, SimpleDS does some things that Objectify doesn't (like
provide a query language and an IndexManager) so you might like it
better.  It just wasn't for me.

Jeff

On Thu, Jan 21, 2010 at 8:18 AM, James Cooper <jamespcoo...@gmail.com> wrote:
> Hey Jeff,
>
> Looks cool.  Looks a lot like SimpleDS though.  Just curious what
> shortcomings you found in SimpleDS.
>
> -- James
>
> --
> 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.
>
>
>
>
-- 
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.


Reply via email to