Quick Comparison of NHibernate Books
NHibernate is an Object-relational mapping (ORM) solution for the Microsoft .NET platform. It provides a framework for mapping an object-oriented domain model to a traditional relational database. It is open-source, easy to use (if you are familiar with good design principles) and offers a lot of extensibility points (logging and interception to name a few). The story begins with Hibernate in Java. In fact, there are many books out there for Hibernate but only a few for NHibernate (so far):
- NHibernate In Action (Manning, 2009)
- NHibernate 2 Beginner's Guide (Packt Publishing, 2010)
- NHibernate 3.0 Cookbook (Pack Publishing, 2010)
NHibernate In Action is written by members of NHibernate (Pierre Henri Kuaté, Tobin Harris) and Hibernate (Christian Bauer, Gavin King) team. It contains a lot of stuff about the internals, such as, the persistence lifecycle, the persistence manager, transitive persistence, the NHibernate type system, advanced query techniques, optimizing object retrieval (I could go on).
NHibernate 2 Beginner's Guide, written by Aaron Cure, targets those who have not used an ORM yet. It helps you find about what is NHibernate, why would you use it, where do you get it, and more. It guides you on how to create mappings (XML and Fluently), types, relationships and more. It contains a whole chapter about Code Generation and even talks about Burrow.
NHibernate 3.0 Cookbook, written by Jason Dentler, is the most recent and most updated. In the chapter about mappings, (besides XML and Fluently) it discuss about creating mappings in code using ConfORM. It describes the Conversation per Business Transaction pattern, the use of Futures, NHibernate Spatial and more! It focus on testing and describes the use of NHibernate Profiler and the Fluent NHibernate Persistence Tester among other. It even promotes design patterns and talks about using dependency injection with entities.