You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ovidiu EFTIMIE <oe...@assemblee-nat.fr> on 2003/11/13 18:47:40 UTC
DTO pattern and WrapDynaBean
Hi,
I've used until now the DTO pattern to transfer data from action forms to the
bussines layer , but I was wondering if using WrapDynaBean (that I've just
discovered) to wrap the action form an to pass it in a DAO class would have
a major inpact on performance.
For example:
===> in an Action (DocumentAction)
DocumentForm dcForm = (DocumentForm)form;
DynaBean wrp = new WrapDynaBean(dcForm);
DocumentDAO dbo = new DocumentDAO();
dom.insertDocument(getConnection(),wrp);
===>and then in the DAO class
public int insertDocument(Connection conn, DynaBean data){
StringBuffer sbf = new StringBuffer();
sbf.append("insert ......").appen(data.get("title")).append(",")
.append(data.get("author")).append(")");
............................................
}
Anyone has any comments?
Thanx
Ovidiu
ps: I'm reposting this beacause yesterday our mail server had some problems and
I'm not sure it was really posted on the list
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org