Are there any guidelines in which cases who should use which layer for
which purpose? I assume Google supports a second persistence layer to
stay compatible to already existing implementations. But which
persitence layer should I use if I start a project from scratch?
P.S.:
@Google Team: Perhaps it would be useful to create a knol à la
"Community FAQ" to answer those questions. A general "Community FAQ"
already exists (http://knol.google.com/k/marce/app-engine-community- faqs) but to have a Java specific FAQ would be nice as well.
"JPA, however, is an Object-relational mapping (ORM) standard, while
JDO is both an Object-relational mapping standard and a transparent
object persistence standard. JDO, from an API point of view, is
agnostic to the technology of the underlying datastore, whereas JPA is
being oriented totally around RDBMS datastores." --
http://en.wikipedia.org/wiki/Java_Data_Objects
So JDO seems to be better suitable for Googles non-RDBMS based data
storage because JDO wasn't explicitly designed for RDBMS.
That comparison was created by DataNucleus, which support both
standards, and donated to Apache JDO. Since we implement both
standards, we believe we have enough background do write such
comparison.
Believe or not, one the greatest differences of JDO and JPA, is that
JDO supports much more ORM features than JPA. So the advantage of JDO
over JPA in this aspect should not affect the AppEngine
implementation.
With DataNucleus, "you could define your persistence mapping using JDO
(XML or annotations) and then persist using the JPA API. Or define
your persistence mapping using JPA (XML or annotations) and then
persist using the JDO API"
If you use DataNucleus with AppEngine or with other databases, either
JDO or JPA should be the same.
> That comparison was created by DataNucleus, which support both
> standards, and donated to Apache JDO. Since we implement both
> standards, we believe we have enough background do write such
> comparison.
> Believe or not, one the greatest differences of JDO and JPA, is that
> JDO supports much more ORM features than JPA. So the advantage of JDO
> over JPA in this aspect should not affect the AppEngine
> implementation.
> With DataNucleus, "you could define your persistence mapping using JDO
> (XML or annotations) and then persist using the JPA API. Or define
> your persistence mapping using JPA (XML or annotations) and then
> persist using the JDO API"
> If you use DataNucleus with AppEngine or with other databases, either
> JDO or JPA should be the same.
Not sure if my comments fits to GAE, but JPA is much easier to set up than
JDO.
Both Eclipse and Netbeans can do reverse engineering and generate all entity
classes from a database in seconds, afaik in JDO you must to it all by
hand.
JPA is just four Interfaces and a concrete class, and JDO, well, it's a bit
larger.
JDO is very powerful, but JPA works just fine.
A.
On Tue, Apr 14, 2009 at 12:18 PM, Christian Edward Gruber <
> > That comparison was created by DataNucleus, which support both
> > standards, and donated to Apache JDO. Since we implement both
> > standards, we believe we have enough background do write such
> > comparison.
> > Believe or not, one the greatest differences of JDO and JPA, is that
> > JDO supports much more ORM features than JPA. So the advantage of JDO
> > over JPA in this aspect should not affect the AppEngine
> > implementation.
> > With DataNucleus, "you could define your persistence mapping using JDO
> > (XML or annotations) and then persist using the JPA API. Or define
> > your persistence mapping using JPA (XML or annotations) and then
> > persist using the JDO API"
> > If you use DataNucleus with AppEngine or with other databases, either
> > JDO or JPA should be the same.
I've been using JPA for over a year now. However, JDO was much easier
for me to setup using GAE.
I tried to switch things over to JPA and had minimal success. When I
found out some existing bugs and limitations with JPA, I decided to
switch back to JDO. I don't remember the key issue that pushed me back
over, but I _believe_ it was due to the lack of current support for
abstract inherited tables in JPA on GAE.
Trevor
On Apr 14, 10:31 am, Alessandro Borges <alessandrobor...@gmail.com>
wrote:
> Not sure if my comments fits to GAE, but JPA is much easier to set up than
> JDO.
> Both Eclipse and Netbeans can do reverse engineering and generate all entity
> classes from a database in seconds, afaik in JDO you must to it all by
> hand.
> JPA is just four Interfaces and a concrete class, and JDO, well, it's a bit
> larger.
> JDO is very powerful, but JPA works just fine.
> A.
> On Tue, Apr 14, 2009 at 12:18 PM, Christian Edward Gruber <
> > > That comparison was created by DataNucleus, which support both
> > > standards, and donated to Apache JDO. Since we implement both
> > > standards, we believe we have enough background do write such
> > > comparison.
> > > Believe or not, one the greatest differences of JDO and JPA, is that
> > > JDO supports much more ORM features than JPA. So the advantage of JDO
> > > over JPA in this aspect should not affect the AppEngine
> > > implementation.
> > > With DataNucleus, "you could define your persistence mapping using JDO
> > > (XML or annotations) and then persist using the JPA API. Or define
> > > your persistence mapping using JPA (XML or annotations) and then
> > > persist using the JDO API"
> > > If you use DataNucleus with AppEngine or with other databases, either
> > > JDO or JPA should be the same.