struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: Private Actions Mappings?
Date Mon, 11 Sep 2006 05:20:37 GMT
It should also be mentioned that action mappings do contain an "include" 
attribute. Unless action including is now considered bad practice, the 
presence of this attribute is proof, from my POV, that it is acceptable 
to include actions.

Michael Jouravlev wrote:
> Martin,
> 
> it seems to me that you explained the pitfalls of action chaining, not
> of action including. The dev list displays a lot of stuff for "action
> including" but nothing really relevant. It has one entry though for
> "action chaining" written by you long time ago:
> 
> http://marc.theaimsgroup.com/?l=struts-dev&m=98963985502939&w=2
> 
> "When a request is chained using a forward, the set of parameters presented
> to the second action is the union of those supplied in the first and second
> requests."
> 
> This does not really bother me when I chain actions, because I usually
> use the same ActionForm. Anyway, chaining actions with a forward is
> not the same as including actions into a JSP file.
> 
> I would be really grateful for an explanation why including actions is
> a bad thing, a link to a prior discussion will do, or even a search
> expression or even a class name to look into.
> 
> Thanks,
>   Michael.
> 
> On 9/7/06, Martin Cooper <martinc@apache.org> wrote:
>> On 9/6/06, Frank W. Zammetti <fzlists@omnytex.com> wrote:
>> >
>> > Martin Cooper wrote:
>> > > For six years or so, I've watched people repeatedly shoot 
>> themselves in
>> > the
>> > > foot becuse they think they want to chain actions and they _don't 
>> know_
>> > the
>> > > consequences or their - uh - actions. The serious problem is that 
>> many -
>> > > perhaps most - developers have no idea what is going on under the
>> > covers,
>> > > and they _will_ get into problems with chaining actions, and will 
>> have
>> > no
>> > > idea _why_ they are getting into problems. There's no way I want 
>> to see
>> > us
>> > > encouraging the use of an anti-pattern that is an anti-pattern for 
>> very
>> > > good
>> > > reasons. Just because it _can_ be done doesn't mean it _should_ be 
>> done.
>> > We
>> > > are here to help users to build their applications as simply as
>> > possible.
>> > > Using techniques that have traps and pitfalls that are easily 
>> stumbled
>> > upon
>> > > is not a good way to do that.
>> >
>> > But don't we also need to explain *why* something is an anti-pattern
>> > too?
>>
>>
>> Yes. And I have explained it over and over again, until I'm blue in the
>> face, for years, as have plenty of other people. It's all in the 
>> archives,
>> along with the rest of the history of Struts. I just don't have the 
>> energy
>> to go through it all again here and now.
>>
>> -- 
>> Martin Cooper
>>
>>
>>   I don't know about anyone else, but I don't accept anything as a
>> > "best practice", or pattern or anti-pattern, until I understand why it
>> > is so, and ultimately agree with it (which means I sometimes have to
>> > change my stance on things as I understand more, but I have no problem
>> > with that).  Understanding and not just accepting advice also allows 
>> you
>> > to make better decisions in the future as you can apply knowledge to
>> > other domains.  It's also partly how less experienced programmers 
>> become
>> > more experienced and able to think for themselves rather than just
>> > following others' words.
>> >
>> > So, *why* is action chaining bad?  What are the traps and pitfalls?  
>> Why
>> > is instantiating and calling one Action from an other bad (I understand
>> > this isn't action chaining, hence two separate questions, but the
>> > question fits here too).
>> >
>> > > Martin Cooper
>> >
>> > Frank
>> >
>> >
>> > --
>> > Frank W. Zammetti
>> > Founder and Chief Software Architect
>> > Omnytex Technologies
>> > http://www.omnytex.com
>> > AIM/Yahoo: fzammetti
>> > MSN: fzammetti@hotmail.com
>> > Author of "Practical Ajax Projects With Java Technology"
>> >   (2006, Apress, ISBN 1-59059-695-1)
>> > Java Web Parts - http://javawebparts.sourceforge.net
>> >   Supplying the wheel, so you don't have to reinvent it!
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: dev-help@struts.apache.org
>> >
>> >
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 
> 

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


Mime
View raw message