You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by cool dude <co...@yahoo.com> on 2002/03/13 11:43:31 UTC

Form Bean to Value Object Conversion ... URGENT!!!

Hi,
 We are facing a problem of converting Struts form
beans to value objects and vice-versa. We use value
objects as coarse grained data returned from the app
tier. Value objects by virtue of their nature of
representing persistent data, are immutable. Form
beans on the other hand are more volatile and
represent data that the user is changing. Hence they
need to be separate implying a "conversion" of one
unto the other during read and writes. When for
instance, a set of value objects is read from the app
tier before an update operation, the value objects
need to be converted into Form beans to be edited by
the user. One way to do the conversion is to localize
the process at each form bean -  however, we wanted to
promote the conversion at a framework level. The
generic conversion could be problematic in cases where
deep hierarchies of value objects are encountered and
more so in case where relations are one to many. Has
any one in this list faced such a problem an are there
any generic design patterns as a solution? Or am I
making sense at all?

Thanx in advance,
VD.


__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>