Durham David R Jr Ctr 805 CSPTS/SCE wrote:

<snip>

So what happens is the Action looks like...

//EmployeeAction
execute(...) or dispatchmethod() {
   EmployeForm empForm = (EmployeeForm)form;
   //validate form, if success proceed..
boolean success = EmployeeActionHelper.updateEmployee( empForm, request );
   //messages set up based on success or failure
}


Rick, I don't like it.  :)  Seriously, you've created a dependency on
Struts in your business layer, and IMO, that's a big no-no.  For my
part, I do something similar, which I posted about yesterday-- I use
DynaForms and cast my ActionForms to DynaBeans before passing to the
business layer.  This way, I have a dependency on BeanUtils in the
business layer, but not on Struts.


- Dave
The solution for this is to revert the dependencies i.e the presenatation layer to depend on business. This can be done with a separate "layer" as glue between both so instead of dependency like this: Employer(BO)--->Form(PresentationObject), it can be Employer(BO)--->MiddleMan<---Form(PrO). and middleman to be responsible of some "actions" like BO<-->Form data transfer, some validation(not just datatype validation) etc In my code, I have one such "middleman" that do such tasks and depends on one Form class and one BO class.
If you are insterested, please see my reply to the Durham David's email.

Regards
Borislav

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

Reply via email to