Did you use EJB1.1 or EJB2.0?  I know that 2.0 is fairly new, but we are in 
the elaboration phase of our project and believe we can use CMP in EJB2.0.  
I'm not on the EJB side, so I don't know the gritty details.

We had serious discussions about bulk accessors etc, but decided to have 
strongly typed Data Value Objects since our product will need other 
interfaces than HTML.  Thanks for the feedback.  I've done what you are 
talking about on smaller projects, but this one is so large it seems to fit 
better with a layered solution to reduce coupling and provide 
DataValueObject access in mixed type mode.


>From: "Steel, Toby" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
>Subject: RE: Value object doubt !!!
>Date: Fri, 24 May 2002 11:56:14 -0400
>
>We do things a little differently to avoid code so much duplication
>between form bean and value object. There is no data conversion as
>a value object is always the vehicle for data delivery.
>
>The form bean holds a data value object(DVO), and every String field of the
>DVO
>(no validation of input in setter method) is accessed directly on populate
>via an accessor to the DVO, getDvo().
><html:text name="myBean" property="dvo.myTextField"/>
>Any field that does require validating input (integers, dates, postalCodes,
>more
>complex objects) has a data holder object in the form bean, along with
>get/set for the holder.
><html:text name="myBean" property="myHolderField"/>
>These holder objects all take string input and have a validate method 
>called
>within
>the form bean validate method.
>The form bean's getDvo() method populates the DVO from the holder objects
>while setDvo() sets the holder objects from the DVO.
>
>This works very well, and we can add to our data model without doing
>anything
>other than adding to the CMP mapping and the JSP inputs. [Unless we need to
>add
>a holder object to the form bean.]
>
>Result: No translation of beans and value objects, only intermediate help 
>on
>those
>fields that throw exceptions in their setters or require non-String input.
>
>
>
>Toby Steel
>
>
>-----Original Message-----
>From: STEVE WILKINSON [mailto:[EMAIL PROTECTED]]
>Sent: Friday, May 24, 2002 10:23 AM
>To: [EMAIL PROTECTED]
>Subject: Re: Value object doubt !!!
>
>
>Given the comments from Craig on not using Value Objects as form beans our
>project is taking the following approach.
>
>We are creating a "helper" class to transform our ValueObject (Data 
>Transfer
>
>Object as we call it) into a form bean (Strings, Boolean, and boolean types
>only) and the reverse.>
> >
> >Radhika Nadkarni wrote:
> > >
> > > hi,
> > > Im having an action Form. Im using Value object for data conversions.
> > > Now my problem is i have two scenarios for implementing the same : -
> > > 1)  Value object will be separate
> > > 2)  Value object will be composed within the Form Bean.
> > > Can anyone tell me which is the best strategy out of the two ?
> > >
> > > _________________________________________________________________
> > > Get your FREE download of MSN Explorer at
> >http://explorer.msn.com/intl.asp.
> > >
> > > --
> > > 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]>
> >
>
>
>_________________________________________________________________
>Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
>--
>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]>




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

Reply via email to