On Tue, 2003-02-25 at 17:31, Laurent Rieu wrote:
> Hi all,
> 
> I have considered implementing the DAO pattern using Avalon for a long time
> now, as this pattern provides some real benefits. You are right when you're
> talking about a common interface which provides clients with
> implementation-agnostic services such as findContract(contractId),
> updateUser(user)... Multiple implementations could then be plugged. I have
> myself used such an architecture where a common interface had two distinct
> implementations, one used JDBC to access a DB, one used JCS to access a
> mainframe. Both implementations did some mapping from the data repository
> to a common object model. The clients just used the common interface and
> object model, without even knowing they were talking with a DB or a
> mainframe.
> 
> Now, as I'm investigating Merlin container, I think your idea sounds good
> but looks like what I have done before. I would like a more dynamic
> configuration using Merlin (or Fortress ?) capabilities. I mean, what about
> having a DAOManager registered which would be capable of handling a
> specific lifecycle extension, such as DAOCapable (or a base DAO interface
> could be used as the extension). Every DAO implementation could declare
> this extension, and be automaticlly registred with a given hint (or
> whatever parameter could be useful) by the Manager at deployment time,
> provided (I haven't given it a close look) there is a way to pass specific
> parameters for a given component during lifecycle extension.
> 
> Laurent
> 

Just a couple more thoughts on this:

Implementing DAO within Avalon is actually fairly simple because you can
have the container do a lot of the work for you.  My problem is that I
sometimes work on projects that do not use Avalon (yet ;) ), so I end up
working out a custom DAO solution.  What I'd like is something that
works in or out of another Avalon container so that regardless of which
project I'm on I can always use the same DAO Framework and API.

I just wanted to check if anyone had already done this before I start up
a project.  If not, then I'll put something together on sourceforge
fairly soon.

-- 
  jaaron    <[EMAIL PROTECTED]>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to