> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]
> Sent: 06 October 2003 17:25
> To: Struts Developers List
> Subject: Re: Struts-chain Behavior Discussion
> 
> 
> Paul Speed wrote:
> 
> >I haven't looked at the implementation yet (I intend to when I have
> >more than 2 seconds free) but I have been lurking in this 
> >discussion.
> >
> >It seems to me that if a command could nest a chain then all things
> >are possible.  In fact, you wouldn't even need the "jump to last
> >command" logic since that step would be part of the master chain.
> >
> >Craig's example might then be like:
> >(1) LookupCommand 
> >(2) ExceptionCatcher 
> >(3) SelectLocale
> >(4) SelectAction
> >(5) Process Form
> >    (a) CreateActionForm
> >    (b) PopulateActionForm
> >    (c) ValidateActionForm
> >(6) CreateAction
> >(7) ExecuteAction
> >(8) PerformForward
> >
> >
> >I don't know how easy it would be to run a chain from a command, so
> >it may not be feasible.  From a processing perspective, it seems
> >clearer to me.
> >  
> >
> Running a command from a chain is trivial.  In fact, that's what the 
> ValidateActionForm code (quoted below) already does.  In this 
> case, it's 
> done for conditional behavior, but that is not required.  You can 
> actually nest chains inside other chains (remember that Chain 
> *extends* 
> Command) for arbitrarily complex straight through processing flows.
> 

Yes you multi-dimensional chains of responsibilities. One dimension
for default chain, and another axis for a fork. 

*Question of Architecture*

Does this mean that we have solved the hideous Action Chaining debate?
In theory an Struts Action could be refactored to be a type of 
``Command'' and therefor Actions could be chained.

Or is the recommendation. Do not make Actions chainable whatsoever,
 but instead write (chains of modular commands) that are called 
from singular monolithic Actions?


--
Peter Pilgrim,
Struts/J2EE Consultant, RBoS FM, Risk IT
Tel: +44 (0)207-375-4923



***********************************************************************************
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
The Royal Bank of Scotland plc is registered in Scotland No 90312
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB
             Regulated by the Financial Services Authority

            Visit our website at http://www.rbs.co.uk/CBFM/
***********************************************************************************


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

Reply via email to