ivelin wrote:
Ugo, can you can share experience with Hibernate vs. Jakarta OJB,  Cayenne
or another Open Source O/R tool.

There is a reasonably objective comparison here
http://c2.com/cgi-bin/wiki?ObjectRelationalToolComparison
but I would like to hear more from a usability, flexibility and performance
perspective.
I cannot really do a comparison here. Hibernate is the first O/R mapping tool I've used (after a few home-made attempts) and I haven't tried either OJB or Cayenne or anything else.

Apart from what I've already said, I like Hibernate also because:

1. It follows the principles outlined in Scott Ambler's papers ([1] and [2]), which I heppen to mostly agree with.
2. It has a lively community behind itself and is being very actively developed.

I think usability is great and is immensely helped by good docs. I cannot comment much on flexibility, I have just one application developed with Hibernate and it was designed in a top-down fashion (i.e. design your ojbects first, than derive the DB structure from them), which is IMHO the best, if you can afford to get DBAs to do what you ask ;-). But Hibernate purports to support all styles of design (top-down, bottom-up, middle-out, meet-in-the-middle, see [3]), so flexibility should be guaranteed.

With respect to performance, I haven't any data and in my application we haven't done any benchmarking or optimization yet. I have the feeling that it is executing a little too many queries behind the scenes, but that by tweaking Hibernate's settings (eager vs. lazy loading, caching) we could get very good performance without mucking with the code.

Biggest problem so far (mostly with some of my co-workers, who have a good SQL background) is that sometimes you get a feeling of loss of control. Not being able to control what SQL statements you application is executing can be intimitading to some. Not to me, I always loathed SQL ;-), but sometimes, when the thing does not work as you expect it to (and most of the times this is due to your misreading of the docs), you wonder whether the Law of Leaky Abstractions [4] is going to apply.

Ugo

--
Ugo Cei - http://www.beblogging.com/blog/

[1]: http://www.ambysoft.com/mappingObjects.html
[2]: http://www.agiledata.org/essays/mappingObjects.html
[3]: http://www.rollerweblogger.org/page/roller/20021013
[4]: http://www.joelonsoftware.com/articles/LeakyAbstractions.html



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to