Monday, January 18, 2016

Top 5 Hibernate Books for Java Developers - Best, Must read

Hibernate is one of the most popular, open source ORM (Object Relational Mapping) framework, which has now become a standard for developing persistence layer on Java enterprise application, along with JPA (Java Persistence API). I often receive  requests to suggest which book is best to learn to hibernate or recommendation about some good books on Spring and Hibernate. This motivates me to write this article about some of the best book on Hibernate, available in the market. Earlier I have shared some of the must-read books on Spring framework for Java developer, which is quite helpful for picking a book on Spring. Similar to Spring framework, experience in Hibernate is most sought after thing in Java JEE development roles.

If you look Java description for development role, you will more often than see Spring and Hibernate than not. All this means, it's must to include Hibernate knowledge and experience in your resume. Since most recruiter uses keywords like FIX Protocol, Tibco RV, Spring, Hibernate etc, having them in your resume will give you more visibility.  Adding right keywords in your resume is definitely one of the top 5 resume building tips, every programmer should note. See here to learn more.

Since most Java developers are familiar with JDBC, they often tend to use that, what they miss is key offering from Hibernate e.g. Lazy loading, Caching and managing association between objects These book will help you to learn Hibernate, grow your existing knowledge in Hibernate and knowing some of the best practices on hibernate and ORM space.

After reading these Hibernate books, you will also be able to answer most of the Hibernate Interview questions, asked to Java developers.

5 Must Read Hibernate Books for Java Programmers

As per my experience, One book is never enough to learn a new technology, but same time, you must have to start with one book. Once you have some knowledge on Hibernate, you can refer more comprehensive books on Hibernate. Because of this reason, I have sorted book on there beginners preference, starting from the first book, which I think is most appropriate for any Hibernate beginners or Java developer learning hibernate framework.

Java Persistence with Hibernate
Now, this is the must-read books for any Hibernate developer. Java Persistence with Hibernate is written by Christian Bauer, Gavin Kin, who are part of the Hibernate development team and involved with EJB 3.0 and JBoss. He is also co-author with Gavin King of Manning's bestselling Hibernate in Action book. So far, this is the most comprehensive book on Hibernate, it not only teaches you basics of Object-relational mapping, hibernate framework, but also most common design patterns, which is used along with Hibernate, such as Data Access Object (DAO)  pattern. This book teaches a lot about fetching strategies, caching, transactions and best practices in database design and ORM techniques. I recommend this book, at least, a one read for any serious Java Hibernate developer, to get a complete picture of Hibernate. This book is over 800 pages, which is not easy to read, but it definitely deserve a look for later reference.

Best Hibernate Books for Java developers

Hibernate Made Easy
Hibernate Made Easy: Simplified Data Persistence with Hibernate and JPA (Java Persistence API) Annotations by Cameron Wallace McKenzie, Kerri Sheehan is a  book meant for hibernate beginners. One of the core strength of this book is that, it's simple, clear and concise, it's not a heavyweight giant. This books has non trivial but yet simple example to explore different features of Hibernate. One of the key thing I like is that examples use my favourite MySQL database. You can also take advantage of a complete web application using Java, JSP and Hibernate running on Apache Tomcat. You will learn more by doing a complete project, than exploring simple examples. In fact, specific feature can also be best learn, when there need arise from doing a complete project like application, this is where this book scores well. If you are Java developer, with little or no knowledge to Hibernate, use this book to learn Hibernate framework. Only disadvantage of this books is that is it doesn't use XML based mapping, so if your application does that, you may want to look to next book.

Beginners Hibernate Book

Harnessing Hibernate
Harnessing Hibernate By James Elliott, Timothy M. O'Brien, Ryan Fowler is an ideal companion to Hibernate Made easy. Former focuses extensively on JPA annotations and this book teaches you Hibernate concepts using XML based Hibernate mapping configurations. Harnessing Hibernate is in continuation of another popular book Hibernate: A Developer's Notebook. I have read couple of Developers' Notebook series including Java 5 Tiger: Developers notebook, and really enjoyed the approach. This is not comprehensive, but it's lightweight and concise writing, makes it a good choice for learning Hibernate. It also has couple of project like application, which helps to learn Hibernate development. It also does a good job on introducing  Hibernate Query language (HQL) and it's different with SQL. You can also use this book to set up a fully hibernate based Java development environment including Spring and Eclipse.

Must read Hibernate Books for Java guys

Beginning Hibernate
Beginning Hibernate Second Edition By Jeff Linwood, Dave Minte is the third book for Hibernate beginners. It's not much different than others two, and if you have read the previous titles than you probably don't need this. But in case, you have difficulty in connecting with previous books, then you can try this one. One of the good thing about this hibernate book is that it covers Hibernate 3.5 version. One of the positive points of this books is case studies, which explains key relationship concepts including one-to-many and many-to-many relationships from top to bottom. Overall, only use this book, if you are not able to connect to Hibernate Made easy and Harnessing Hibernate, otherwise, you have enough at the beginners level.

Good Book to Learn Hibernate Framework

Hibernate Recipes: A Problem-Solution Approach by Gary Mak, Srinivas Guruzu
I picked this book because of it's style, a problem solution approach. Similar to Spring recipes : A Problem-solution approach, this book teaches you hibernate by introducing a problem and then solving it. This method can work for many developers, and if you have enjoyed previous books on this series, you will going to like this one as well. Every single recipe is explained well with proper code example and decent explanation. One advantage, which I personally feel, while reading this book is comparative learning. For example, if you are doing that in JDBC in one way, how Hibernate helps you there, what more it offer etc. Though sometimes this kind of book is overwhelming to read and may not suite continues topic based reading, but for a change it does work.

Top Hibernate Books for Java Programmers

That's all on my list of Top 5 Hibernate books for Java programmers. Despite all this book, I highly recommend Hibernate documentation, they are the most updated source of information and they are quite well written as well. Since one book is not always enough to master any new framework or technology, I mostly use 2 or 3 titles. For intermediate Java developer,  I suggest, Hibernate Made Easy + Java Persistence with Hibernate, as two best books to learn most about Hibernate framework.

Further Learning
Introduction To Hibernate
Spring with JPA and Hibernate
Hibernate Performance tuning

Other Hibernate Articles and Interview Questions you may like
  • Difference between First and Second level cache in Hibernate? (answer)
  • Difference between get() and load() method in Hibernate? (answer)
  • 5 Spring and Hibernate Training Courses for Java developers (list)
  • 2 Books to Learn Hibernate in 2017 (books)
  • 5 Books to Learn Spring Framework in 2017 (books)
  • Why Hibernate Entity class should not be final in Java? (answer)
  • 10 Hibernate Questions from Java Interviews (list)

Thanks for reading this article, if you like this article and interview question then please share with your friends and colleagues. If you have any question or feedback then please drop a comment.


Nikhil said...

Excellent collection Javin. I am picking up Hibernate Made Easy very soon. Excellent.. Thumbs up for your posts.

Ankit Kamdar said...

Hi. I want to Learn Hibernate. I am having knowledge about Servlet, JSP, Struts. Which book should i read for Hibernate.

Rakesh said...

Hello Javin, which book should I read to latest version of Hibernate i.e. Hibernate 4.0? I believe couple of books are still focusing on XML style configuration of hibernate and not jusing JPA annotation, Can you please let us know the book for learning Hibernate with JPA?

Javin Paul said...

@Rakesh, There is hardly a book which is updated to Hibernate 4.0, I guess best and latest resource is hibernate documentation. Though I recommend, Java Persistence with Hibernate as reference book.

Vlad Mihalcea said...

Hi Javin, would you be interested in reviewing my book too?

Javin Paul said...

Hello Vlad, Sure, will take a look but I guess it's still in progress right?

Anonymous said...

For those who are looking for free Java books, here is a list of 10 free Java Programming books, include books on Java 8 too.
Cheers ...

Post a Comment