Tuesday, January 18, 2005

Review - Hibernate

HibernateHibernate: A J2EE Developer's Guide
by Will Iverson

4 out of 5 stars

Hibernate is a popular object-relational mapping (ORM) system for Java programmers. As any Java programmer who has worked with a SQL database knows, trying to link Java objects to a relational database is not a trivial exercise. Hibernate simplifies the task by providing an API and a set of tools that can generate Java classes and link seamlessly to a database.

The book starts with an introduction to Hibernate including some details on installation. The author looks at how Hibernate can generate a database schema or it can generate Java classes depending on where you are starting to build your application. XDoclet is discussed with the author pointing out some of the issues with using class annotation. After the introductory chapters, the author gives a good explanation of the details of Hibernate in the middle chapters. The last few chapters look at performance, caching, design issues and other advanced topics. Throughout the book there are many code samples that help to further explain the use of Hibernate.

I do have a few complaints about the book. Although performance is discussed, the cost of using Hibernate on performance is not. I would have liked to see some comparisons of Hibernate versus stored procedures, for example. Also, the weaknesses of an ORM are not discussed. Anyone who has worked with an ORM knows that at a certain level of complexity they start to fall apart and make an application overly complicated. It would have been nice for the author to discuss these issues and at least point towards solutions. Overall, the book serves as a well-written and clearly explained basic introduction to Hibernate.

This earned 4 stars on Amazon. The book is published by Addison-Wesley.

The review can be seen on Amazon on My Amazon Reviews page.


At 1/18/2005 7:15 PM, Blogger Vic said...

Check this:
It supports stored procedures, etc.

At 1/18/2005 7:39 PM, Blogger Brian said...

I am amused by your comment, "Anyone who has worked with an ORM knows that at a certain level of complexity they start to fall apart and make an application overly complicated," as I thoroughly agree that they don't fit all problems, but i wouldn't categorize the problems they are ill suited for as the "complex" problems!

At 1/18/2005 7:57 PM, Anonymous Anonymous said...

I guess we are just to take it for granted that O/R Mapping doesn't work for complex apps? So how are you going to get objects from the database? Not get them and just work with data? From experience, this is more complex. Hand code it yourself? This is more complex too.

At 1/18/2005 8:49 PM, Blogger Tom P. said...

I don't want to turn this into a discussion of Hibernate because this is really about a book. The point is that there are certain problems in development that an ORM is ill-suited to (whether you think of them as complex or not, they are certainly are complex to code using Hibernate). It is this discussion, how to identify and handle situations where Hibernate is difficult to use that is missing from the book. I would have liked to see at least some discussion of this so that developers interested in Hibernate aren't surprised when they run into problems using Hibernate.

At 1/08/2006 3:06 PM, Anonymous Anonymous said...

The time saved on writing your own queries is spent trying to figure out the enormous complexity of the Hibernate configuration file.


Post a Comment

<< Home