struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject [OT] Re: DAO pattern
Date Mon, 04 Feb 2008 19:41:57 GMT
2008/2/4, Zhang, Larry (L.) <lzhang20@ford.com>:
> Sorry if this is not too on topic.
>
> 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?

It depends.
If you can have the user object from one source at a time, then the
best approach IMHO is one interface/3 implementations.
If you are getting this user object from these sources at the same
time, use one DAO, and manage connections inside it.

Ciao
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message