cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Malcolm Edgar" <malcolm.ed...@gmail.com>
Subject Re: ORM Comparison
Date Thu, 09 Aug 2007 23:39:24 GMT
Having uses both Hibernate & Cayenne for many commercial project, I have
found Cayenne to be much more productive 2x.

With Hibernate you need to:
* setup a lot of configuration stuff, or use Spring to do this for you
* write your Java classes
* write your mapping files
* design your database
* generate your database

With Cayenne you:
* model your db entities & object entities and their relationships
* generate classes
* generate database

Hibernate also encourages a top down approach, which I think for most
business applications is wrong. If you get the database model wrong in your
application you are in real trouble.  This is where your initial design
focus should be, not at the object entities, which most applications simply
map to the db schema.

With Cayenne you also can refactor code much more quickly, and the
subclass/superclass generation pattern is really good as you don't clobber
your business methods when you regenerate data object superclasses. With
Hibernate you have to manually maintain the mapping file relationships to
the database tables and the Java classes.

In our web applications we through away the DataContext with each request,
so we don't have any memory issues. NamedQueries returning RowMap objects
are also very performant, especially when paged.

The Cayenne Modeler has a few wrinkles but once you get used to them,
Cayenne beats the pants of Hibernate. I have tried a few time to get the
JBoss Hibernate Eclipse plug-in going but never with any success.

regards Malcolm Edgar

On 8/10/07, Robert Zeigler <robertz@puregumption.com> wrote:
>
> Probably would... I was using 2.x for this particular project,
> in large part because it needed to be done very, very quickly
> (~1 month to replace an app that had been somewhere around 20k lines
> of php).
>
> Robert
>
> On Aug 9, 2007, at 8/94:23 PM , Joe Baldwin wrote:
>
> > Robert,
> >
> >> Hm...  I recently wrote an app that involved processing large
> >> numbers of rows
> >> (to the tune of about 250,000 currently, and sure to increase
> >> rapidly).
> >> Granted, I had to code a little more carefully... create "throw
> >> away" data contexts
> >> for some operations, etc. But the app runs quite nicely with cayenne.
> >> What performance issues did you encounter?
> >
> > Didn't I just recently read a post in which Andrus commented that
> > the original architecture assumed that persistence objects would
> > *not* be released until the DataContext is destroyed and garbage
> > collected.  I *believe* the new version allows more control over
> > the atomic release of data objects, if I recall.
> >
> > Could this have any influence on the performance issues that were
> > reported?
> >
> > Joe
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message