Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Interested in a book on NHibernate with ASP.NET?

There are a few Java/Hibernate books out there, a couple chapters here and there on .NET/NHibernate, but a glaring vacuum for published material concerning the development of ASP.NET/NHibernate applications, specifically.  ASP.NET certainly has plenty of special cases when it comes to integrating NHibernate and a book dedicated to the subject seems warranted.

I'm not implying anything by this post's title...but just assume, for a moment, hypothetically of course, that a book were in the works for using NHibernate with ASP.NET...  A short sampling of topics would include getting started with NHibernate (including the 80% of NHibernate that you use regularly), unit testing with NUnit and FitNesse, generics, open-session-in-view, passive view & supervising controller (model-view-presenter), multiple databases, usage of interceptors, web services, advanced topics, many others...and most importantly...putting it all together. 

1) Would this interest you?  Would you, instead, be more interested in a book concerning NHibernate with .NET 3.0?

2) What other ASP.NET/NHibernate topics, or areas of difficulty, would you want covered? Personalization, membership, web parts, etc?

3) Finally, what type of book flow works best for you?  An assortment of design ideas such as Patterns of Enterprise Application Architecture or Domain Driven Design; a start to finish application-building book such as Agile Web Development with Rails or ASP.NET 2.0 Website Programming; or somewhere in between like Applying Domain-Driven Design and Patterns?

Thanks for any feedback you can provide!

Billy


Posted 11-28-2006 3:23 PM by Billy McCafferty
Filed under: ,

[Advertisement]

Comments

Jason wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-28-2006 8:43 PM

Definitely!

I bought Hibernate in Action which I found pretty average to be honest.  Apart from the obvious fact that this book is for the Java version of Hibernate (not a big problem though), I found that it didn't go into enough depth about the intricacies of the Hibernate framework and its coverage of most of the settings went little deeper than reiterating the name of the setting!

So, although I am proficient with the use of NH now after having used it in several projects, I am sure there are better ways of doing things and would love to see some best practices or patterns for common use cases.

PEAA is a great book but I think its shortcoming is the lack of specific implementations which can leave you with an awful lot of stuff to figure out for yourself...but maybe I'm just lazy! I like to see real world examples that implement the concepts being discussed as this leaves less room for misinterpretation.

Cheers,

Jason

Jeff Perrin wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-28-2006 8:47 PM

1 - Yes it would interest me. How would .NET 3.0 affect nHibernate usage patterns?

2 - Nothing you mention here would interest me.

3 - A start to finish guide would probably work best for the majority of people.  There's tons of examples on the web that show you how to set up the simple stuff (like mappings), but next to nothing showing how to integrate nHibernate into a solid architecture.

That said, there's at least two major usage patterns for nHibernate that I'm aware of (feel free to add to this)... An active record style of approach, in which MVP, session in view, etc patterns would be appropriate, and a Unit of Work style that lets you work nearly transparently with a domain model.

In my mind, code examples would differ a great deal depending on which style of use is chosen.

Brian Donahue wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-28-2006 9:00 PM

Absolutely.   I was just wishing there was something like this the other day.  Would it  be possible to touch on 3.0 changes/improvements while giving a foundation for using NHibernate with 2.0?  I'd also vote for the "tweener" book like Applying DDD which I'm currently reading.  Boy, I sound like a fence-rider.  Also - I'm really interested in the FitNesse aspects too... haven't found any good intros (haven't really spent a ton of time looking, I confess) to using Fit with .NET.

Urmo wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 3:40 AM

NHibernate documentation is pretty good, adding another book is in my humble opinion total waste of time, there are far too many "getting started" books around (generally) and far too few with real value.

What would be interesting is a collection of case studies how NHibernate was applied in specific project, what were the problems and how those problems were solved.

David Kemp wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 4:14 AM

This sounds like it could be a really useful resource.

With regards to .Net 3 - most companies I've work for (and it's been four this year) aren't even onto .Net 2.0 yet (or are only slowly moving), so .Net 3 is a bit too far off yet.

If you could provide a book that provided information that was agnostic to all three versions of the framework, and also provided clearly indicated framework specific information, this would be great.

I think a recipes style book would work best - most of the time, it's not so much a case of getting into NHibernate (there are some tutorials around this), but more solving specific problems with it.

The bits about Unit testing, Fitnesse and MVP sound great. I would welcome some extra guidance on how to implement MVP with ASP.Net, especially if a full example that goes beyond the usual "display a business object on a page".

Billy McCafferty wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 9:24 AM

These comments are exactly the candid feedback I was hoping for...thanks and keep them coming!

Sachin Rao wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 10:19 AM

Absolutely.

Will be absolutely handy in my opinion.  You have quite a few topics there... NHibernate with ASP.NET would be a complete book in itself (with lots of real-world examples, of course).  Add to that, FitNesse testing (testing of any kind), patterns, etc.... now  you're talking about a series of books.  Dunno how you would be able to do justice otherwise.

The last thing anyone needs is a book that talks about a whole lot of things, but at a very superficial level.

I would buy it, if it would provide answers, not to the straightforward issues, but to the knotty problems that you only come across in a real project.

For example, I get pissed off these days when I see yet another article on MVP, because it simply won't cover the topic in depth.  I'd like to learn about it, but I've yet to see anyone write about it with the richness of a real world project experience behind it.

Move away from the cursory examples, that's all I'd say.

Sachin

Billy McCafferty wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 12:04 PM

Sachin,

This brings up a great opportunity...I've written an MVP article previously which can be found at http://www.codeproject.com/useritems/ModelViewPresenter.asp.  I'm not looking for a pat on the back here...I'm interested in very candid criticisms as to how it could have been better and more in depth.  (This would help give me examples of how tech writing skirts the real issues that people want to read about...and certainly have a positive effect on my writings in the future.)  Some topics that aren't discussed enough in the article might include security?, web services?, concurrency and asynch calls?  Thanks for the comments!!

John W. wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 12:47 PM

1) This would interest me and I would buy it! I think (like someone already mentioned) .NET 3.0 kind of took me by surprise. I thought I was on the cutting edge using 2.0 (so I would say stick with 2.0 for now)

But that brings up another thing. While researching ORMs I read that MS will come out with their own ORM: ObjectSpaces, in the future. I don't know if this was released with 3.0 (I think I read somewhere that it was planned to be at one time).

2) Some best practices for NHibernate and ASP.NET 2.0 Membership would be awesome!

3) I really don't read books much. I use them for reference mostly. I have found "Hibernate In Action" very useful for NHibernate

dru wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 2:01 PM

I would love a small book (20~30 pages) on FitNesse.

Billy McCafferty wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 2:08 PM

dru,

Although it's not "small," a good book to go with is Fit for Developing Software by Mugridge and Cunningham.  And now that the FitLibrary has been ported to .NET, the book has become even more applicable.  http://fitnesse.org, obviously, is also a great resource.  WRT the current context, I'd be looking to demonstrate techniques for integrating FitNesse tests with an NHibernate data layer.

Ben Scheirman wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 2:51 PM

Billy,

This is a fantastic idea.  I would definitely purchase such a book.  And I believe that you are a prime candidate to write it.

There is a growing community of NHibernate users (as I can tell from visitors of my blog), and this specific topic definitely warrants it's own book.

I supremely prefer the build-an-application-as-you-go approach, because you are presenting the information as the reader would if they were implementing these ideas on their own.

When can I pre-order?

Tyler wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 6:38 PM

I think sticking with .NET 2.0 is a good way to go. Like John W., I was taken by surprise with .NET 3.0. I think it's just Microsoft's way of trying to generate buzz with new releases when most of the production world is still on 1.1 or 2.0. Maybe a small section at the end for .NET 3.0 differences, but certainly not the focus of the book (if we're talking about getting it out in a reasonable time frame, that is).

I'm torn on the model the book should follow. Building an application as you go is nice, but sometimes when I'm learning I want to skip to the fourth or fifth chapter because the previous ones bore me. I also like to flip around a book and pull out examples without having to know the context of the entire code. Then again, trying to give a useful example of an in-depth feature isn't easy if you don't have a complex "real-life" code-base to work from. It's a tricky balance, for sure. Perhaps the balance can be struck if at the beginning of each chapter you recap the current code base, such as in a special gray box area so readers who are reading straight through can safely skip it. Also, including downloadable code that I can use to load the code as it stands at the beginning of chapter 4 and go from there. On that same token, the code also gives me something to check against if my code doesn't work as expected after following along.

Whatever you do, _please_ assume I am already completely familiar with .NET syntax and the language. No need to explain to me what a method is, what encapsulation or inheritance is, etc. If I'm using an ORM I already know that stuff. :-)

Really nice things I like about technical books are exercises. In data structure/algorithm books, I like the exercises to be highly theoretical to emphasis the principle and how far it can be pushed and stretched. In books about how to write practical production code with an ORM, I want the examples to be things I can see myself using—reusable principles, perhaps even reusable code. Otherwise, I’ll take one look at the example and deem it a waste of my time to complete, citing little reusable value.

In summary, I think you should cater to an intelligent, experienced, and working audience, not the lowest common denominator (or the upper extreme)! Please, no beginner C# or .NET chapters. There are plenty of books for those people. If it’s about NHibernate, let’s talk about NHibernate.

Best of luck! You know where to find me.

Tyler wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-29-2006 6:40 PM

"In books about how to write practical production code with an ORM, I want the examples to be things I can see myself using"

Meant to say "exercises" instead of "examples". Of course I want reuse for both, but I wanted to emphasize it for exercises.

Christopher Bennage wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-30-2006 10:04 AM

Another "Yes" vote".

1. Yes, I'd be interested.  I've been thinking a lot about how things like DependencyProperties might be applied to domain models.

2. Not so much.

3. I llike the style of Nilsson's book, but I would prefer a little more focus (I feel like it gets off course a bit).

I've been using a home grown ORM and one of the things that has roused my interest in NHibernate is the Castle Project.

Rob Eisenberg wrote re: Interested in a book on NHibernate with ASP.NET?
on 11-30-2006 10:26 AM

Billy,

Great idea.  I'd love to read such a book.  In the last week or so I have been looking back over your default asp.net architecture and the related articles.  Good stuff.  I'd love to see a book that builds a real world asp.net app from start to finish using the architecture specified in your previous article.  A book like that is seriously lacking in the .NET world.

As to .NET 3.0, well you know I'm a big fan :)  But, sticking to 2.0 technologies is probably the best way to go for now.  The architectural ideas can be transfered easily enough and you could always write an online chapter or such to discuss how you might have done things differently using some of the pieces from 3.0.

Frank Wang wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-06-2006 5:53 PM

Like what i said in NHibernate forum, I'd like to see a real world asp.net application in the book. Actually I'm using your default asp.net architecture - NHibernate,Windsor, Generic DAO..., it's working beautifully. The only piece I don't use is MVP. It looked great at first, but soon I found it's not practical to use in most complex user interfaces. Maybe I don't understand it deeply enough. Anyway, I vote for such a book and It will become compulsory reading if it has the same quality as your articles.

Leon wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-11-2006 1:31 PM

I would be very interest to take a look at this book.  Couple of weeks ago, one of my friends, who is JAVA guy, introduced me that Hibernate and Spring.Java. I have beginning to look at their equialent in .NET.  Both of them are very interesting.  Currently, I have begin to use Spring.NET in one of my small projects so that I can evaluate it.  

So if you are writing a book for NHiberanate, I hope that you could bring one or two chapers to get more inside in the integration with Spring.NET.

1. That sounds interesting.

2. Not much, exception Spring.NET/NHibernate integration

3. I would like some more useful, more practical samples, not though one or two lines dummy ones.  

Stuart Jones wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-12-2006 4:41 PM

I'm a definate yes.....

We're still evaluating NHibernate and I can see its massive advantages however there are still lots of issues as far as I can see, especially if you are not developing a DB from scratch. I'm not sure if a paper-based book is the best idea at the moment. I'd say a solid online resource is what is really lacking from NHibernate at the moment with many of the ideas mentioned here.

The Code Project articles just don't go into enough depth and information is changing all the time. Thanks for your efforts though (including the Code Project articles) and for the response you've given to emails

Michel Grootjans wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-13-2006 6:22 AM

Where do I preorder my copy? ('nuff said)

Billy McCafferty wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-13-2006 1:47 PM

This all sounds promising...if/when this proceeds, I'll expose content and ideas for further feedback.  Thanks for all the input!!

Evan wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-19-2006 2:24 AM

Just tell me where to preorder. :-)

If I got to choose the book's content, I would be sure to include NHibernate + Dependency Injection (Castle Project, Spring.NET, ObjectBuilder) + Generics + Interceptors + AOP (Seperation of Concerns) + UI Patterns (Passive View, etc)

These are the topics that are at the very top of my list of topics to investigate. Give me three of the above and it will be worth it's weight in gold to me.  If you can give some introductions on NHibernate with a few advanced topics and then focus on some of the related material (as mentioned above), the shelf life will also last a lot longer (unlike the books about WinForms 2.0).

Lee Carter wrote re: Interested in a book on NHibernate with ASP.NET?
on 12-28-2006 11:58 PM

My vote is for a start-to-finish application building book using NHibernate / Castle Project.

David Peterson wrote re: Interested in a book on NHibernate with ASP.NET?
on 01-11-2007 10:29 AM

Yes, with membership and roles.

Cheers.

Steve wrote re: Interested in a book on NHibernate with ASP.NET?
on 03-22-2007 6:55 AM

Please do!!!

I'd like to see information on how to work with web services with NHibernate, etc...

Using Windsor with NHibernate would be fantastic as well

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)