So where should one invoke the persistance layer?

-----Original Message-----
From: Lacerda, Wellington (AFIS) [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 22:51
To: 'Struts Users Mailing List'
Subject: RE: DAO or ... ?
Importance: High


Hi Kevin

Avoid persistence in Action code as much as you can.

This is the general recommendation.

Wellington Silva
Author of "JSP and Tag Libraries for Web Development"
FAO of the UN - Consultant

-----Original Message-----
From: Kevin Viet [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 14, 2002 4:45 PM
To: struts-user
Subject: DAO or ... ?


My question is a web app design question.
What pattern you guys follow when you want to save a domain object in
the database ?:

- use the DAO pattern of java blueprint  (persistence layer is called
into classes)
- call to persistence statements into action code :

        // store example
        try {
                PeristenceLayer pl = getPerstitenceLayer();
                pl.save(domainObject);
        }
        catch (Exception


--
Kevin Viet <[EMAIL PROTECTED]>
ActiVia Networks




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


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


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

Reply via email to