Radhika,

I'm also kinda a struts newbie, so don't take this as the word of an expert!

In a recent project that I did, I used FormBeans as wrappers over Value
Objects. I found some strong points to this kinda design:

- Separation of view related and biz logic issues
-- The Action class calls into the Session Layer, gets a DTO/VO, Inits a
FormBean.
-- The Action class retrieves an updated DTO from a FormBean, and calls into
the Session Layer to update the Biz layer

- Separation of 'Presentation' level validation (is a field blank, does it
contain a valid float etc.) from Biz level validation (is field1*field2 <
field3/1.5 etc)
-- Essentially, the FormBean does the Presentation level validation, and
then delegates to the DTO, which could do lightweight Biz validation.
-- The ActionErrors stuff is all taken care of within the FormBean. For
Presentation level validation errors, the FormBean has control anyways. For
Biz level validation errors, The DTO can throw a ValidationException which
the FormBean catches and takes care of by adding to ActionErrors.

I'm waiting for Chapter 7 of Chuck's book (On theServerSide.com) to read up
more on this ;)

Hope this helps,
- Lalit

----- Original Message -----
From: "Radhika Nadkarni" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 24, 2002 2:35 AM
Subject: Value object doubt !!!


> 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]>

Reply via email to