Well, as usual we don't much like commenting upon the competition. We'd much rather that let our software speak for itself. Nevertheless, we recognize that people are trying to sell Hibernate to management and we suppose its our responsibility to help make that easier. So lets step into territory that is naturally controversial. We'll answer the question directly for once: why should you use Hibernate rather than any of the existing commercial JDO products. (We won't address opensource competition like OJB, TJDO, etc, because we don't diss other opensource efforts. Ever.) We could argue for hours about minor technical advantages and disadvantages but for now lets focus on the big differences:
Hibernate is a functional superset of JDO
The Hibernate APIs and query language solve problems that are not addressed by the JDO spec. Particularly important points are:
* Hibernate is suitable for reporting. You can write queries with aggregation, projection, subqueries, etc. People even use HQL from Jasper Reports!
* Hibernate fully supports detachment and selective reattachment of persistent object graphs. This means you don't need to write data transfer objects in a distributed architecture.
* Hibernate provides runtime fetching strategies, fully integrated into the query facilities, allowing you to finely tune exactly how much data is retrieved in each query.
* Since Hibernate is not trying to be too general, we expose some lower-level features of the relational database. For example, pessimistic locking is supported via the LockModes, the Query APIs support query pagination and now also multi-region query caching, its easy to mix JDBC and handcrafted SQL with Hibernate code in a single transaction.
Of course, JDO2 tries to catch up to us on some of these things. But its hard to catch up to a target that moves faster than you do.
A further advantage, that may or may not be important to you, depending upon your development style and environment, is:
* You don't have to implement a mandatory interface or enhance your code in the build-process - and you don't need control over classloaders. Hibernate allows for unmatched portability of your unmodified plain Java classes.
Hibernate is open source
You'll find all the great things about open source software here:
* helpful user community
* rapid bugfixes (we aim for < 48 hours)
* rapid releases
* open to suggestions for improvement
* project is driven completely by developers, not marketing types
* we love what we do
* no "vendor lock-in"; you have the source!
* huge userbase, which means that you can be confident of the quality / robustness (we have a bigger userbase than any other ORM vendor)
Hibernate has all the advantages of commercial software, too
We have our cake and eat it:
* good free documentation and a book on the way
* backed by a commercial support organization bigger than any of the ORM vendors except for TopLink
* one fulltime developer already, hopefully more to come
Signed:
Gavin King
Christian Bauer
Max Andersen
|