Sunday, April 10, 2011 1:35 AM AlecWhittington

[Book Review] NHibernate 3.0 Cookbook

 I was recently given the opportunity to review the latest NHibernate book, NHibernate 3.0 Cookbook by Jason Dentler. If you do any NHibernate development, you need to have this book in your collection. The content is well thought out as well as organized.

I started out with NHibernate in January 2008,  kicking and screaming. Part of my issue was the use of XML everywhere, coupled with seemingly little to no documentation. Look at us now, oh have the times changed. We now have six books dedicated to nothing but NHibernate, as well as a very active mailing list. The latest book on NHibernate is NHibernate 3.0 Cookbook by Jason Dentler, published by Packt Publishing. The book includes 70 Recipes which generally build on previous recipes or earlier boiler-plate code.

 Jason does a great job with explaining what the recipe is going to do, showing the code needed for the recipe, then explaining in detail what each piece is doing. This style of writing helps users of all skill level understand easily what is happening and gets new users up and running quickly. The book starts off with the basics, but as I later found out, if your an experienced NHibernate user, you should still read these chapters as code from them will be used in later recipes. You start by creating mappings with several different technologies, ranging from Nhibernate XML files to using ConfORM. Once you've mastered mapping, you are introduced to Configuration and Schema. This again is another chapter every user should read, no matter what your experience level is with NHibernate.

 Chapters 3 through 8 cover the meat and potatoes of the NHibernate. They cover everything from Sessions and Transactions, Testing, Extending NHibernate, and using various NHibernate Contrib projects. One section I found particularly was that on Sharding Databases for performance.

 I would recommend this book for NHibernate beginners as well as experienced NHibernate users. There is enough information in the book to thoroughly cover NHibernate across all experience levels and not feel like it was targeted at only one group or the other.

Filed under: , , , ,

Comments

No Comments