May 27 2009

NHibernate In Action

Category: zvolkov @ 19:09

Amongst other activities, lately I've been in the process of reading NHibernate In Action, the only NH book on the market. My general impression so far, the information delivery is much more cohesive and complete than the NH online manual and definitely helps building a better picture of NH as a whole, which is what's missing with modern GOP (Google-Oriented-Programming) approach.

Now, with the best feeling, I can't help but comment on the only bitter spoon in the otherwise sweet jar of the book, namely Chapter 1:

With the rest of the book covering progressively more advanced material, Chapter 1 is supposed to make a case for NH by comparing alternative data access techniques, introducing the notion of ORM and presenting unique NH features. As much as I hate being negative (what a positive phrase huh! :)), I must say the chapter fails miserably.

If you're a noob you won't understand a thing of what they say as they randomly jump from topic to topic briefly hinting at things you've never heard of. If you're an expert looking for an inspiration for making a business case for NH in your firm, you'll be amazed at the level of argumentation along the lines of "w/o NH solving problems the NH way would be really difficult and that is why you need NH".

While some paragraphs (like those comparing various data access techniques) suffer from extra brevity, some other (like the one on the 3-tiered architecture) set the level of discourse way too low. Consider the following pearl: "you've probably ... worked with a relational database ... if you haven't, see Appendix A". Ok, we may not know ORM, but who do they think we are, high-school students?!

Not only this chapter suffers from broken stream of thought and uneven level of presentation, the authors also seem to be unaware of other kinds of applications than Windows or Web GUI that may also benefit from ORM (like the guts of "enterprise" systems) nor do they give good examples of data-access problems that should not be solved with an ORM (such as for example data mining and reporting).

In short, don't waste your precious time and skip this useless crap (I hope they rewrite it completely in the next edition). And, if you ever had any kind of experience with NH, skip Chapter 2 as well.

The rest of the book is well worth your time. Enjoy.

Tags:

Comments

Comments are closed