The first is I've been taking my data models and making beans out of them as
I should ya?  So a user in my "portal" let's call has a UserBean with get()
set() methods for each of the properties.  But for for registering a user,
struts requires a FormBean.  So I've repurposed the same data model bean and
made it a form bean.  Is this good or bad?

Do you have 2 identical classes , which are solely different by that they
are implementing another interface or extending an abstract class? Can't you
make a wrapper class from your FormBean which wraps the UserBean? You can do
this by means of 'delegation'. I think that it's better to use delegation
instead of keeping 2 copies of the data model( one in the userbean and one
in the formbean).

D.


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

Reply via email to