Re: Cayenne vs Hibernate Comparison

From: Marek Stanisław Wawrzyczny (marek_wawrzyczn..nternode.on.net)
Date: Tue Sep 07 2010 - 02:58:33 UTC

  • Next message: Aristedes Maniatis: "hot servlet deployment"

    Hi,

    It's been a while since I've used Cayenne and so far my dealings with it have been based around dabbling with code that's being handled by more competent people. ;) Having said that, I've used Hibernate for about 4-5 years and have some experience with it so here's my 2c.

    Lazy initialisation

    Yes, it is a problem but there are solutions. We used Spring frameworks extensively and Spring's OSIV filter solves the HiB problem to a large degree http://forum.springsource.org/showthread.php?t=57441 You will still encounter problems with mapping of relationships - you have to be careful about joins (eager or lazy), locking. There are bugs when defining/using more complex relationships, I can't remember the details but I remember a particular bug that involved deep relationship fetch/ordering using a particular Collection type being a few years old… there were a few of these.

    Hibernate's popularity

    Much of it is due to its momentum but some of the adoption might also be dictated by the support within IDEs or simply the range of plugins available. Many of these are ORM agnostic, being based around the Persistence JSRs (which admittedly are based on HiB). For example, I am curious about the Persistence module support within NetBeans. A direct benefit of setting up persistence presence in a framework is that you can then use the Web Services plugin to generate RESTful services based on Entities defined in the Persistence framework. The premise sounds neat. I've been trying to find a Cayenne Entity Manager that's needed to setup Persistence support for Cayenne in NetBeans - not sure if such beast exists.

    Of course, the availability of these tools makes a rather mundane task potentially* much easier. Hibernate doesn't just integrate with IDEs. This pretty much extends to frameworks - there's HiB support in Tapestry, Struts, Spring, etc… Whether this support is basic or not, or even necessary, a Google search by a curious user will reaffirm that it is a "supported" framework.

    So, I don't think that Hibernate's popularity should be dismissed simply as a manager's decision.

    * Well, if it actually works… :)

    Cheers,

    Marek Wawrzyczny

    On 06/09/2010, at 04:21, Joe Baldwin wrote:

    > Hi,
    >
    > I am again responsible for making a cogent Cayenne vs Hibernate Comparison. Before I "reinvent the wheel" so-to speak with a new evaluation, I would like to find out if anyone has done a recent and fair comparison/evaluation (and has published it).
    >
    > When I initially performed my evaluation of the two, it seemed like a very easy decision. While Hibernate had been widely adopted (and was on a number of job listings), it seemed like the core decision was made mostly because "everyone else was using it" (which I thought was a bit thin).
    >
    > I base my decision on the fact that Cayenne (at the time) supported enough of the core ORM features that I needed, in addition to being very similar conceptually to NeXT EOF (which was the first stable Enterprise-ready ORM implementations). Cayenne seems to support a more "agile" development model, while being as (or more) mature than EOF. (In my opinion. :) )
    >
    > It seem like there is an explosion of standards, which appear to be driven by "camps" of opinions on the best practices for accomplishing abstraction of persistence supporting both native apps and highly distributed SOA's.
    >
    > My vote is obviously for Cayenne, but I would definitely like to update my understanding of the comparison.
    >
    > Thanks,
    > Joe
    >



    This archive was generated by hypermail 2.0.0 : Tue Sep 07 2010 - 02:59:08 UTC