Raghuveer wrote:
Can we send ActionForm as argument to a method in DAO class from Action
Class.

Can you? yes. Should you? almost certainly not.

What is Best Practice ?

You should keep your model decoupled from your view. Passing Struts artifacts like action forms into the data access layer creates undesirable dependencies between layers, as well as making your model layer harder to unit test.

Action forms are intended as an intermediate representation of form data, not as general DTOs. If you need to pass data into a DAO, pull it out of your form bean and wrap it into a model-centric, type-safe transfer object.

L.


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

Reply via email to