NHibernate 3.0 Cookbook
RickJWagner writes “Are you a .Net developer? Do you have to persist your application objects to a database? If so, I know of a book you might be interested in, Packt Publishing’s NHibernate 3.0 Cookbook. NHibernate is a port of the popular Hibernate object-relational mapper (ORM, for those who like TLAs.) An object-relational mapper is a framework that lets the developer get and retrieve application state from a database, and it does so in an efficient, non-intrusive, and flexible manner. Hibernate is the top of the line ORM implementation, yet it’s easy enough to learn that even a newbie will find it easy to get started.” Read on for the rest of Rick’s review.
|NHibernate 3.0 Cookbook|
|summary||The ultimate “how-to” reference for NHibernate 3.0|
As far as content goes, there is a lot of useful content in this book. The author presents 70 different recipes for activites that range from the basic (i.e. your first class-to-database mappings) to the unusual (i.e. using NHibernate Spatial for solving distance-related problems.) The author offers plenty of good text in most of these, but again– don’t be upset by the placement of the high-level material. It’s all there, it’s just placed a little differently than what you’d find in most technical books.
The book is easy to read. The text is plain and straight to the point, and the author’s writing style is quite readable. The code examples are likewise clean and well-formatted. (By the way, I’d urge you to go to Packt’s site to get the source bundle if you buy the book. There’s a lot of code referenced, you certainly wouldn’t want to type it all by hand if you can get it handed to you.) The book runs a little over 300 pages, and most of the type is generously spaced. This is not a strong theoretical reference, but it is more than adequate as a primer for the vast majority of the tasks you’d want to accomplish with NHibernate.
So who is this book good for? I’d give it high marks for .Net developers who want to use NHibernate, regardless of experience level with the tool. I say that because there are enough use cases presented that there is almost certainly a subset of new material for almost anyone. How about Java Hibernate users? I think it’s a decent book for them– NHibernate is a very close port of the base product, so a Java user can get something out of this book, too. (For that crowd, this would obviously not be a good primary choice, but is worthwhile reading if you already have a Java go-to reference for Hibernate.) For anyone else wanting a good high-level overview of ORM use– I’d say this book is only of marginal value. This is because the bulk of the explanatory material is presented in the context of ‘how to’ accomplish some particular task and isn’t easily accessible without skipping from recipe to recipe.
By the way, lest you think NHibernate is only for .Net devs, I mostly ran the code samples under MonoDevelop on Ubuntu. This was my first adventure with MonoDevelop (the open source IDE for Mono, which itself is an open source, multi-platform port of .Net.) I was pleasantly surprised by the level of polish in the development environment, it really is a nice environment. Again, if you’re a Java developer, I’d consider this book a decent learning supplement but would not recommend it as a primary for Hibernate proper.
Source: NHibernate 3.0 Cookbook