Monday, January 21, 2019

Book review: Java Persistence With Hibernate (Second Edition)

A really nice book about Hibernate and its internals. It starts with the ORM concept, problems this concept tries to solve and main trade-offs. Authors introduce a simple auction application and explain how to design domain models and their relationships using Hibernate and this application all around the book. There are many approaches to solve the same problem and this book shows them and explains the pros and cons behind the solutions you can apply. A few chapters go even beyond the Hibernate itself by giving overview of the fundamental knowledge of database transactions, ACID attributes, locks, isolation levels and caching.

This is my first book in Hibernate and I had had rough knowledge before I read it. It helped me to structure my knowledge, helped me to look under the hood and see how things actually work. I finally understood those occasional exceptions we got at my previous project and parts which were designed in a wrong way. However, there is one thing I would like to see better explained - a second-level cache. It would be nice to see it earlier in the book and get more examples and details about its applications and trade-offs.

I would definitely recommend this book to all levels of engineers. It is also a good source to refresh your Hibernate knowledge or to come back later if you need some clarifications.

Time spent on the book: ~39 hours