Dont know that I like the idea of tying the form bean to the persistance layer so tightly. (Although admitedly my own formbeans know a wee bit more than they ought to about the persistance stuff!)
-----Original Message----- From: news [mailto:[EMAIL PROTECTED]]On Behalf Of V. Cekvenich Sent: Monday, October 14, 2002 22:55 To: [EMAIL PROTECTED] Subject: Re: DAO or ... ? "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. .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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

