-->
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.  [ 2 posts ] 
Author Message
 Post subject: dao architechture advice
PostPosted: Thu Apr 15, 2004 4:00 pm 
Beginner
Beginner

Joined: Thu Feb 26, 2004 11:32 am
Posts: 32
hi:
I am implementing a session beans -> dao - > hibernate architechture.
I wanted to know what is a better idea to have a DAO / persistent class
or have a DAO serving a group of logically related persistent classes.

I was prefering the latter as we have a large number of persistent classes.Any advantages to the first approach ?

tia

splash


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 4:20 pm 
Senior
Senior

Joined: Wed Mar 24, 2004 11:40 am
Posts: 146
Location: Indianapolis, IN, USA
I had this same issue a while back when I started working on my current application. After debating a lot, I decided to go with the model of a DAO per persistent class. I created a DAOInterface and defined all the possible methods (searchByPrimaryKey(), search(), add() - covers saveOrUpdate, delete(), addMultiple(), deleteMultiple() etc...).

The biggest advantage I have seen from this approach is the ease of use and the standard templating that you can do to rapidly write new DAOs. Other developers who weren't initially involved with the project have said that they find it much easier to understand this structure as well. Hope that helps.


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