I've been using Java AppEngine since it became available.   I chose
JDO for portability and so I could get started very quickly.  I can
say that JDO offers very little real portability for significant apps
because of the very different semantics of the underlying datastore.
If I were developing for an SQL datastore, my datamodel would be
pretty different.  For instance, it is easy in most SQL datastores to
use one or more fields as a unique, mutable secondary key (like an
email address or Social Security Number).  In the appengine datastore,
if you have the datastore generate unique primary keys, but you want
to enforce a unique mutable secondary key, you need to use a separate
entity to serve as the secondary key mutex.  This is a fine solution
if you are using the low level API, because you can have your data
access layer create and check this mutex so this does not bubble up to
your application code.  However, with JDO, you have to create another
pojo and manage it so it can serve as the mutex.  Ick.

When I chose JDO, no wrapper for the low level existed and
documentation of the low level was not great.  JDO was well documented
so I could get going fast.  However, there are now several good
alternative frameworks for using the low level datastore.  If I were
to start today, I would choose one of them and avoid JDO.  Now that I
know what I know, I will probably write my own low level wrapper so I
have more flexibility and control.


On Apr 2, 8:46 am, Jeff Schnitzer <j...@infohazard.org> wrote:
> An incomplete list of things that are difficult or impossible with
> JDO/JPA, but easy with Objectify/LowLevelAPI:
>
>  * Partial indexes
>  * Running multiple concurrent transactions, or (more likely) a
> transaction + a nontransaction.  Because of GAE's transaction model,
> this is actually necessary quite often.
>  * Migrating your schema.  JDO/JPA is particularly brittle, you can't
> even add primitive fields to a class.
>  * Serializing your entities.  With JDO you must detach them
> explicitly, with JPA (as implemented by DataNucleus) you simply can't.
>
> In practice, the biggest difference after abandoning JDO/JPA is that
> you will stop screaming loudly at your computer, annoying your
> coworkers.
>
> Jeff
> (copied from the response to the same question on the objectify mailing list)
>
>
>
>
>
>
>
> On Fri, Apr 1, 2011 at 4:50 AM, SkYlEsS <shou...@gmail.com> wrote:
> > I have a question :
>
> > What are the differences between JPA/JDO and low level API (and
> > Objectify) in practice ? I read everywhere the low level API provides
> > more flexibility, but there are never samples code or evidences to
> > demonstrate it. So I'm wondering in which cases exactly, the low level
> > API is useful ?
>
> > Thanks in advance
>
> > --
> > 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-java@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-appengine-java+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://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-java@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