struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manos Batsis <>
Subject Re: DAO pattern
Date Mon, 04 Feb 2008 19:54:05 GMT
Zhang, Larry (L.) wrote:
> I have a user object whose data is from three resources: Db2, LDAP, and
> other flat file. Per dao pattern, do you think I should have three daos
> or one dao to encapsulate the data access implications? 

Depends on what is easier for you. This will not effect your code if you 
your DAOs implement a common interface and your code uses a DAO Factory 
to obtain the right DAO instance implementing that interface.

Personally, I have the habit of making one DAO per business entity, so I 
would join the three you mention into one. This or the opposite is 
mostly useful as a convention shared between members etc.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message