struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Husted" <>
Subject Next steps for Action 1.3.1 (was Re: Reasons for 1.3 release)
Date Mon, 20 Feb 2006 15:19:39 GMT
On 2/19/06, Michael Jouravlev <> wrote:
> On 2/19/06, Frank W. Zammetti <> wrote:
> > Anyone can quote chapter and verse from the GoF book.  Can you instead
> > explain *why* what's in Struts isn't CoR?  And, perhaps more
> > importantly, explain why, even if it isn't an exact match for the
> > pattern, it matters one bit?
> By the way, is Struts CoR actually a CoR? This is not a trick
> question, I am just asking.

I think one of the reasons the current processing chain is so complex
is because it just refactors the old set of method calls into a set of
commands. This is a good starting point, but there is more we could
do. The next step might be to anaylze the different scenarious the
current guantlet is trying to cover and compose those into different
chains. Which chain is called would depend on the nature of the

For example, there no reason to call a processing chain that includes
handling uploads if the request isn't doing uploads. Or code that
handles modules if modules are not being used.

One idea might be to build the processing chain dynamically on a per
request basis.

Though, and even better approach might be to follow WebWork's lead and
arrange for each Action to have it's own processing chain. There could
be a default chain for the application, which an individual action
would be use, replace, or extend.

In our ASPX applications, we build the web processing chain
dynamically on each request. There is a "pre-opt" chain and a
"post-opt" chain, and an  Action Command (which could also be a
chain). When the request comes in, we create a new chain, and add the
pre-opt chain, the Action chain, and post-opt chain to the new dynamic
chain, and then execute that.

Of course, a benefit here is that it is easy to test the Action chain
in isolation, along with the individual commands. The pre-opt and
post-opt chains can also be tested in isolation.


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

View raw message