Pro Hibernate 3, by Jeff Linwood, Dave Minter (Apress)
The good stuff:
- Clear and consistent.
- Very few errors (spotted just a couple, minor ones).
- Good typography.
- The authors know their stuff, and it shows.
The not so good stuff:
At 242 pages, this book is too thin. No, let me restate it: it is way too thin. I’m not particularly fond of very thick books, but when the subject matter is complex, you simply can’t get away with a cursory glance at its intricacies. You see, at 408 pages, I still think that Hibernate in Action, though it is probably the best book on the subject, would be just great if it packed a few more pages.
The problem with Hibernate is that beneath its apparent simplicity lie a large number of difficult problems. Don’t get me wrong, I still think Hibernate is the best ORM tool out there. Unfortunately, Object-Relational Mapping is a hard problem. Solving the Object-Relational impedance mismatch in a fully transparent way is probably impossible: all proposed solutions so far are, in the end, yet another abstraction layer. And as we all know, all abstractions leak, one way or the other.
If you are just beginning to approach Hibernate and think that you will get a decent coverage of the complexities, traps and pitfalls of a tool like Hibernate in just 242 pages, you’re bound to be disappointed. Here are just a few subjects that I would have liked to see covered much more deeply:
- HQL syntax. The official Hibernate documentation already gives some more complex samples, but their explanation is too concise. A good complement to the docs should probably clarify what you can and what you cannot do in HQL.
- Exotic mappings.
- Tuning and optimization.
- Caching. What are the benefits and drawbacks of the various caching strategies and implementations?
- Lazy loading. It is my experience that novices sooner or later will get the dreaded
LazyInitializationException. What techniques can be used to avoid it? - Cascading rules and their effect on the lifecycle of entities.
- Bulk loading and saving.
- Using versioning to implement optimistic locking.
- Others that I don’t remember at the moment.
All in all, I don’t think this is a bad book. Quite the contrary. It’s just that I think the authors could have dispensed some more of the goodness they are evidently capable of. As it stands, you will at the very minimum need to have a copy of the official Hibernate documentation, plus Hibernate in Action, on your desk, together with Pro Hibernate 3.

0 Responses to ““Pro Hibernate 3″ review”