Le lun 14/10/2002 à 16:55, V. Cekvenich a écrit : > "Avoid persistence in Action code as much as you can." > Yes. > And a way to do that is to say in action something like: > > formBean.save() > > where the formBean has something like this in save() {getDAO().update()} > > and the DAo does the save for the bean. > But I'v read that the domain objects needn't know that are persitent, if you implement a save method that means that ur object know it can be persisted
> .V > > Lacerda, Wellington (AFIS) wrote: > > 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 > > > > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- Kevin Viet <[EMAIL PROTECTED]> ActiVia Networks -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>