Here's a msg I posted to the Tapestry mailing list a while back:
[I wrote:]
Hi,
I've been a contributor to the Cayenne project for two years. Until
my current contract I hadn't used Hibernate before, so I've never been
able to speak fairly about comparing them. From a 5,000ft view, they
are very similar. They take database tables and relationships and
map them to composite Java objects. Once all the gears are setup it's
smooth sailing. But, when you get down and dirty there are massive
differences between these frameworks.
The learning curve for Hibernate is much steeper. Many of the
developers in the Cayenne community have first tried Hibernate, and
just gave up because of its complexity.
Cayenne has GUI modeler tool that is fairly simple to use. It will
allow you to create db tables, object entities, and reverse engineer a
database scheme. Hibernate has the equivalent with 3rd party tools
like middlegen, hbm2java, and xdoclet. There is a little more
gathering/configuring to get the Hibernate stuff up and running.
Hibernate seems to be very "transactional", which could be an advantage
in some cases. I found it to be more of a nuisance in our development.
Using Hibernate you open a session, create a hql query, execute it,
and close the session. All prefetching of related objects is the
developers responsibility. This may not seem like a big deal until you
started working with it and you get tons of "Hibernate session was
closed" exceptions when you attempt to fault a relationship. This is
not an issue with Cayenne because every Cayenne data object has a
handle to it's DataContext (sort of a Hibernate Session equivalent).
I think another advantage Cayenne has over Hibernate is it's mailing
list. People get responses in a timely manner, usually from
committers. Hibernate has a forum, but it seems to be far less useful.
I can't blame the Hibernate Team for this. Their community is so
big, they must be completely frustrated with being beaten over the head
with the same questions day in and day out. If you don't have thick
skin, beware. I've seen a few people take a verbal bitch slapping on
the Hibernate forum.
Ah....I could go on forever, but I need to get back to my Hibernate
work! :-)
Cheers,
Eric
On Sep 21, 2004, at 4:02 PM, Joćo Paulo Vasconcellos wrote:
> My manager asked me to suggest some frameworks and solutions to define
> the standard environment here at my work. I will defend cayenne +
> tapestry (thanks to Steve) and was wondering if, besides the modeler
> gui, the more familiar (to me) approach with DataContext and the
> outdated hibernate docs, cayenne has other edges when compared with
> other ORM frameworks. If anyone has a link to some kind of
> comparision, please post. I have read some articles already, but I was
> interested in something like "I was a hibernate user and shitched to
> cayenne because of .......".
>
> Thanks for your time,
> --
> Joćo Paulo Vasconcellos
> ICQ: 123-953-864
>
This archive was generated by hypermail 2.0.0 : Wed Sep 22 2004 - 17:22:46 EDT