Updates
Latest Tweet
What's New?
Check out for latest innovation, a computer based training video collection
Like this Page
Professional Hibernate (Programmer to Programmer) Review by Thomas O. Lianza
A really bad book - do not buy
I'm a fan of a lot of Wrox books - I probably own 15-20 of them. This is the wost one I have ever bought.
When learning a new technology with a book, I like to start with an overview, then some simple examples. I read the chapters that cover those start to finish. I then selectively read other parts of the book where I need more detailed knowledge, and save the rest of the book for reference on an as-needed basis. This book was laid out (if you simply look at the Table of Contents) as if I could do that - so I bought it.
The introduction was ok. I've used some object-relational tools before and I wasn't quite sure why Hibernate was special or different. The key thing that it took me WAY too long to figure out was that with Hibernate you're thinking Java-centric and are persisting objects to a database, whereas with other tools you're thinking database-centric and generating a layer of Java objects to access that database. I had to read an awful lot to figure that out.
As others have said, this book is FULL of typos. Among my favorites is the one on page 20 where they introduce the SessionFactory and in the huge diagram they call it "SessionFactor." Glaring and disappointing, but technically it doesn't hinder the learning process (aside from being distracting). On page 28 they give an example where they basically say (paraphrasing) "lets pretend you have a server with an IP address of 192.168.1.55 and a user named 'readwrite'..." they then show the hibernate configuration file right after it and the server's address is 'localhost' and the username is 'sa'. In the following sentence they say to replace localhost with your actual server address, apparently having forgotten all about the 192.168.1.55 address that they started the paragraph with. Awful, and now potentially confusing to people.
Where I really gave up all hope on this book was the first example where they took a program and gave it the ability to persist data with Hibernate. First off, a good demo program should be DEAD simple, so you focus your time reading the code that has to change (Hibernate-related), rather than reading all the code that has to run the demo. Their demo code literally runs from page 33-38, and uses a Swing UI. 5 pages of code for the example, only a small fraction of which the reader should really be focusing on. Now the WORST part. They say that they're going to take this program and step through how to make it persist ("That is the goal of the remainder of this section" they say). The problem is - the example code *already has* all of the hibernate code in it. They go on to step through how to take an example and make it work for hibernate, but never showed you the code BEFORE hibernate was in it.
At this point, after a little more browsing around, I gave up on this book. I should have read the Amazon reviews first. Do yourself a favor and buy a different book based on what the other reviewers have read - that's what I'm going to do.