RE: Feedback regarding Cayenne vs Hibernate

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Thu Sep 15 2005 - 15:19:06 EDT

  • Next message: Gili: "Re: Feedback regarding Cayenne vs Hibernate"

    Hmm ... What I was really wanting to see on the wiki (how does Cayenne
    differ from Hibernate) is perhaps more quantitative than perhaps feel
    (not that feel is a bad measure, though).

    For example, Cayenne objects must be subclassed from CayenneDataObject
    and must reside in a DataContext in order to use them, while Hibernate
    uses POJOs. Stuff like that (although with more detail, such as why
    Cayenne wants things in a DataContext, etc).

    As for ease-of-use, I found Cayenne to be vastly easier to use than
    Hibernate. I had a test program working in under an hour. With
    Hibernate, I spent more than 8 hours wading through the documentation
    trying to construct the right XML, only to learn that it wasn't going to
    work (stumbled across a passage in the Hibernate documentation saying
    that array data types were not supported as primary keys).

    Of course, this was just my personal experience. I think how well you
    pick up either depends on your background, experiences, etc. For me,
    Cayenne just felt more right and I was able to get into it easier since
    I could focus on my problem (modeling the database layer) and not worry
    about it's specific flavor of XML (yes, I'm a fan of graphical
    modelers). I'm also quite biased about the dual-class generation
    scheme. ;-)

    /dev/mrg

    -----Original Message-----
    From: Gili [mailto:cowwo..bs.darktech.org]
    Sent: Thursday, September 15, 2005 2:56 PM
    To: cayenne-use..bjectstyle.org
    Subject: Feedback regarding Cayenne vs Hibernate

            Ok, I've finally ported enough of my application that I can
    begin to
    give you some feedback.

            Cayenne seems to be faster than Hibernate in some areas, slower
    in
    others. I don't have very reliable figures as of yet but I'd guestimate
    that Cayenne yields equivilent performance to Hibernate.

            Ease of use... Hibernate is easier to get up and running with;
    it
    definately requires less work up-front. On the other hand, if something
    breaks while you're developing in Cayenne it seems to be easier to
    figure out what is wrong and how to fix it than Hibernate. With
    Hibernate this takes days, whereas in Cayenne this takes hours.

            If there is one feedback I would send to the Cayenne authors
    it's that
    ease-of-use needs to be improved. It is true that Cayenne is
    functionally similar to Hibernate, but the Cayenne API makes you jump
    through too many hoops to get anything done. You end up having to learn
    way too much about Cayenne's internals to get anything done. A simple
    example is flushing the context cache:

    context.invalidateObjects(context.getObjectStore().getObjects());

            The API needs to be more user-oriented; less technical, more
    human.
    "Context.flush()" is far more readable and easier to learn than the
    current API. This is just one example; there are a handful of others. I
    understand a lot of you are coming from a EOF background, but coming at
    this with a blank slate it isn't the cleanest API in the world.

            I'd like to propose a few API changes but I'm not sure if it all
    right
    to discuss this on the mailing list...?

    Thanks,
    Gili

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Thu Sep 15 2005 - 15:19:10 EDT