On Wed, March 9, 2005 3:11 pm, Frank W. Zammetti said:
> On Wed, March 9, 2005 3:02 pm, Shey Rab Pawo said:
>> This is more, not less, code, is it not?   You have:
>>
>>    <setupItem setupClass="com.omnytex.setupexample.setups.SetupClass1"
>>> setupMethod="setupMethod1" />
>>
>> which has to be used for all actions that use this, right?

Forgot to reply to that last line... yes, it has to be used for every
action that used that setupItem, *or* every forward that uses it.  But
that's no different than having to have the actual line of code calling
the static method in every class that needs it.

Plus, this helps keep things separated better, especially with forwards...
consider the case where an Action may return one of five different
forwards.  Each of those forwards may require different setup functions be
called.  But the setup functions are really associated with the JSP your
going to, NOT the Action that just completed.  Why should the Action have
to execute setup for a page that comes *after* it?  That's not really
proper separation of responsibilities, right?  I guess the argument isn't
as strong for the actionmapping-level setups, but I think of those more as
"these have to get done no matter what happens, and with that in mind, why
add code for it?  Better to let Struts to it for me, just like I let
Struts populate my ActionForm for me".

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

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

Reply via email to