struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bailey, Shane C." <>
Subject RE: Why not to use Action chaining ?
Date Tue, 22 Jul 2003 14:31:16 GMT

I think the main reason it is bad to chain actions is that they are tied to
the GUI (more specifically they are tied to a Servlet front end because of
the presence of the request and response).  Therefore, anything that is
chained between servlets means that it isn't reusable if a different GUI is
to be attached.  So if there was business logic in the Action then it needs
to be duplicated for a different front end type.  This is just my take on
it. Is that it in a nutshell?

The one place I use chaining is on a form where form A must be reached
before form B and so if the user tries to get to B first (by using an old
URL and pasting a new ID for instance) the action in B detects A hasn't been
hit and it forwards to action A.  I don't think that is a bad use of action

-----Original Message-----
From: Jens v.P. [] 
Sent: Tuesday, July 22, 2003 10:26 AM
To: Struts Users Mailing List
Subject: Re: Why not to use Action chaining ?


> Could anyone of you tell me why we ahuld not use Action chaining in
> struts framework ?

I'm a Struts newbie, so maybe my answer ends up in a new question. But 
as far as I understand the action pattern (question 1: Are Struts 
actions commands as described in the GOF book). And as far as I 
understand this pattern, an action (or command) capsulates an action in 
an object. An action or command has no state (question 2: as far as I 
understand this pattern... maybe I'm wrong).

So - why do you want to chain actions? Maybe because one action 
"extends" another action, like one use case can extend another use 
case. In this case, somewhere a state must exists, because otherwise 
one action "includes" the other action. But a state must have no 
influence to an action.
If you have two actions with no other dependency but that the user can 
trigger them - so why do you need to chain them?

> I neet to do two different actions for a user action. how can i 
> wachieve
> it without action chaining?

Maybe you can explain, why you need two different actions and why you 
think you have to chain them.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message