-->
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.  [ 5 posts ] 
Author Message
 Post subject: In the search for a good web example
PostPosted: Sat Jun 03, 2006 10:02 am 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
Does anyone know where to find a good example that uses NHibernate in a web app and a n-tier approach? If the example uses web services to communicate with the UI, even better, though not required... I'm having troubles thinking in a good architectural way to handle my app, wondering if collections inside a class should be lazy, and if so, how to update them when needed...

Thanks a lot!

Alejandro.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 8:51 pm 
Beginner
Beginner

Joined: Mon Aug 15, 2005 11:50 pm
Posts: 22
Have you seen Cuyahoga? http://www.cuyahoga-project.org


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 8:56 am 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
I downloaded it and understood nothing... it's way too big... I guess what I'm looking for is NOT an example after all, but some theory... Or a very small example... I don't even know what I need! Thanks anyway...

Alejandro.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 11:54 am 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
I think most of the "examples" you will find on the web, including Gemini and Cuyahoga will seem a bit complex, but in actuality there are fairly simple, especially older versions of Cuyahoga (like 0.9).

Basically, imho, you will want a Facade that is a Singleton that wraps the ISessionFactory interface. You can see a fine example of this in Cuyahoga. Then you can go the "Facade-wraps-Services" model for implementing business logic that needs access to the NHibernate session, or the "DAO" model for implementing basic CRUD operations. In my app, I use both DAOs and Services since some of my business logic needs to wrap a transaction around changes to many distinct entities.

Web services with NH has seemed to be somewhat of an issue based on the posts I've read. I personally, haven't used Web Services yet, but you will run into a stumbling block in the fact that NH uses proxies for everything lazy loaded. Search this message board for "Web Service" and see what you find.

-devon


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 07, 2006 3:48 am 
Newbie

Joined: Wed Jun 07, 2006 3:15 am
Posts: 14
An excellent article for asp.net/nhibernate best practises and a small demo app

http://www.codeproject.com/aspnet/NHibe ... ctices.asp


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.