I am involved in the refactoring (rewriting) of an existing distributed .NET web application that has a back end exposed using web services - the system is implemented with a load balanced web layer, and a load balanced app layer. I am wondering what the accepted best practice for managing the session and passing around objects is. I've done quite a lot of reading and found this article
http://www.codeproject.com/aspnet/NHibe ... ctices.asp
on "NHibernate best practices with ASP.NET...", but it discusses putting the session management (opening and closing etc.) in the web layer. I've also seen BenDay's example,
http://blog.benday.com/archive/2005/10/25/3054.aspx
where he uses an IHTTPModule in the business layer to manage the session, which (while an IHTTPModule) is able to be used with either a web app or a windows forms app. While these examples are very useful for getting started with NHibernate in an ASP.NET world, I'm wondering if these approaches are actually what people are implementing in their production systems.
Also, I understand that by having all session management in the web service/business layer it will be necessary to use either transient objects or DTOs. If transient objects are used, (potentially) a lot of extra data will have to be transported between the layers. If i use DTOs, it will be necessary to always use a "select before update" approach (is this actually implemented within NHibernate, as in Hibernate?), requiring a larger amount of database utilisation. I'm also wondering what approach people are employing in this scenario.
The benefits of making use of NHibernate 1.2 are very obvious, but I realise that it is only in beta stage at the moment. Is there a proposed release date for it, as we will be working under reasonably tight deadlines (release early next year)?. I would feel more comfortable knowing that 1.2 will be released by then before proceeding with what at this stage, is a beta product (although very comprehensive, functional and full featured).
Any useful advice appreciated. Thanks.