
I have used NHibernate on several projects, but sadly had to hunt and peck for good information on how to use NHibernate in my projects. There are just no books, other than NHibernate in Action
, and the content as a rule is spread across blogs, screencasts, wikis, etc. and this is truly no way to learn best practices and O/R Mapping fundamentals on probably the most difficult O/R Mapper to understand - NHibernate. As a rule people don't want to spend a lifetime learning a persistence framework, which is why I think NHibernate has not received wide adoption.
Finally, however, those looking to learn NHibernate have been rescued from this utter torture of finding good guidance with NHibernate in Action. I could have used this book a long time ago as it not only explains the fundamentals of NHibernate, it also dives into:
- O/R Mapping in General
- Domain Modeling in General
- Adding NHibernate to Your Persistence Layer
- NHibernate's Solutions for Complex and Legacy Scenarios
I think the book hits a really nice balance at
- Teaching the ideas behind O/R Mapping, Domain Modeling, and Persistence Patterns to help people understand the value and importance of an O/R Mapper like NHibernate
- Showing you the myriad of options on configuring and using NHibernate, which makes the book a good reference
- Plugging NHibernate into your applications so you can get it up and running
The only downside to the book is that it only covers NHibernate v1.2 and there are some really neat features in NHibernate 2.0. However, this is really only a problem if you are very familiar with NHibernate and already know and understand the fundamentals of NHibernate. My guess is that the book is geared to those completely new to NHibernate and possibly O/R Mapping. Before you can truly use and appreciate the features of NHibernate 2.0, you need to understand the basics.
My hope is that the authors are already busy working on a second edition that covers NHibernate 2.0, Linq to NHibernate, and some of the spin off projects like Fluent NHibernate, Sharp Architecture, and other pieces that help you implement NHibernate.
If you are serious about learning NHibernate, you want NHibernate in Action
.
David Hayden