-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: NHibernate Best Practices with ASP.NET, 1.2nd Ed.
PostPosted: Tue Apr 03, 2007 5:50 pm 
Beginner
Beginner

Joined: Fri Sep 02, 2005 12:13 pm
Posts: 44
Location: Denver, CO
I've very pleased to announce the release of NHibernate Best Practices with ASP.NET, 1.2nd Ed. on CodeProject.com.

Preface to the 1.2nd Edition

In March of 2006 I published my initial thoughts on NHibernate best practices with ASP.NET, generics and unit tests. I've been delighted to learn that these ideas have been implemented in a number of real-world scenarios with strong success. Since then, I've worked with many people to refine these ideas, learn from mistakes and leverage a more powerful version of NHibernate. Accordingly, although only a modest, yet important, amount of modification has been made to the underlying architecture, some other important factors have been updated and addressed in this article:

* Quite simply, NHibernate is awesome. In the previous edition of this article, I assumed you already knew this...but I now try to convince the dissenters as well.
* NHibernate 1.2 natively supports generics.
* NHibernate 1.2 natively supports nullable types.
* NHibernate 1.2 natively supports mapping attributes.
* NHibernate 1.2 can communicate with stored procedures.
* Using CallContext for ISession storage in ASP.NET was susceptible to failure under load.
* Exposing a publicly settable ID property created a point-of-susceptibility.
* Providing automatic parent/child wiring, via Ayende's very helpful NHibernate.Generics, was more headache than help.
* Have you used Rhino Mocks 3.0, NUnitAsp, or Fit? Well, these are all discussed with an expanded emphasis on test-driven development.
* As an alternative to my recommendations, also consider Castle Project's offerings such as MonoRail and/or ActiveRecord for a simple yet powerful out-of-the-box framework for ASP.NET. In fact, if it's technically feasible and you can generate buy-in on your team for these off-the-shelf tools, I would recommend using them over a ground-up solution. But even if you do use Castle Project facilities, this article should still have a lot of useful information for you!
* In addition to those listed above, there are other important refactorings and fixes throughout the article and the code. This edition is by no means just a light touch-up of the original article.
* In addition to an overhaul of the original sample code, an expanded "enterprise" sample has been included demonstrating:
- NHibernate with web services
- NHibernate with multiple databases
- Integration with Castle Windsor
- A reusable data layer for the data access components.
- A simple example of Model-View-Presenter

I hope this article will be chock full of (at least a couple) good ideas no matter what your level of experience is. I look forward to hearing your experiences with the article and any feedback you may have. I've also included some areas for further research for anyone interested in taking the sample framework further.

Billy McCafferty


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 04, 2007 3:52 am 
Expert
Expert

Joined: Tue Aug 23, 2005 5:52 am
Posts: 335
Thanks Billy,

Your original article really got me to understand that there's a better way and I'm looking forward to reading the updated version!

Cheers,

Symon.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 04, 2007 9:28 am 
Beginner
Beginner

Joined: Tue Feb 13, 2007 9:29 pm
Posts: 21
Thanks Billy,

Your tutorial is the most helpful tutorial that I've came across when I started NHibernate and having the 1.2 edition to follow up, it will definilty enhance what I have done so far(I'm using 1.2 already)

Thanks for your great work! If not for your article on codeproject, then I probably will still be out here searching for examples.

Tito


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.