struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Evans <dsev...@berndtgroup.net>
Subject Re: Is Action Chaining Strongly Discouraged?
Date Wed, 03 May 2006 01:29:03 GMT
On Sun, 2006-04-30 at 20:33 -0500, Joe Germuska wrote:
> At 5:10 PM -0700 4/30/06, David Evans wrote:
> >below...
> >
> >On Sun, 2006-04-30 at 17:47 -0500, Joe Germuska wrote:
> >>  On 4/30/06, Caroline Jen <jiapei_jen@yahoo.com> wrote:
> >>  >I have seen some discussions on this forum regarding
> >>  >action chaining.  Primarily, the advices are to think
> >>  >through the business logic before making decision on
> >>  >chaining actions.
> >>  >
> >>  >What are the disadvantages of action chaining?  Why
> >>  >action chaining is not a good practice?
> >>
> >>  http://wiki.apache.org/struts/ActionChaining
> >>
> >>  As noted in that page, ActionChaining is using Struts in a way which
> >>  often works, but for which it was not specifically designed.  It's
> >>  possible that you might run into some odd situations where the
> >>  assumption that a single HttpRequest results in only a single pass
> >>  through the RequestProcessor causes something to go wrong.
> >>
> >>  I usually just refactor my app when I find myself wanting to use
> >>  action chaining, but many people just do it and find that it works.
> >>
> >>  Joe
> >
> >How do you handle the population of the contexts which are passed to the
> >jsp to which you are forwarding?
> >...
> >Is there a reason you don't use the two action (setup and submit)
> >approach?
> 
> The reason I don't is because I know that the original design of the 
> RequestProcessor didn't expect there to be two passes through in a 
> single request, so that it's possible (in theory) for some values to 
> be in unexpected state.   Having known that, i've just developed 
> design strategies which don't require chaining.
> 
> We use Tiles in every webapp we do, so I have often used Tiles 
> Controller classes for view population; I've also designed a few 
> strategies implemented with changes to the RequestProcessor (or with 
> custom chain commands since struts-chain) -- but none of which I felt 
> were clearly something which should be committed to Struts proper.
> 
> I know for a fact that many people have used action chaining (and I 
> have at times too) and it hasn't been a problem.  I can't cite 
> specific problems people have raised in the past that traced back to 
> action chaining, but maybe there's something in the archives.
> 
> So it's not so much that ActionChaining is considered "harmful" as 
> it's understood to be potentially surprising.
> 
> Hope that helps
> 	Joe

Thanks it does help. I'm in the "gather as many ideas as possible
stage", so thanks.

dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message