On 6/8/06, chamal desilva <[EMAIL PROTECTED]> wrote:
Hi,

I read few articles on struts. They recommend not to
send action form class to EJBs as data holders. They
recommend we should use general classes for holding
data to decople web tier with EJBs.

What they say must be correct but I still have few
doubts (Maybe b'cause I am not experienced).

Don't we have to modify two classes, if we use both
ActionForms and normal java classes to store data.For
example we will have modify two classes to add a new
attribute, remove attribute etc.

Please help me to understand this more clearly.

It is not a good practice for persistence layer to know details about
presentation layer.

What you can do is to use our business objects as nested object within
a form bean. When you submit an HTML form, Struts will automatically
populate your nested business object, which you can persist.

Btw, new web beans JSR will allow to use EJBs directly as JSF backing
beans. So maybe this could be a reason for you to switch to JSF.

Michael.

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

Reply via email to