On 2/19/06, Frank W. Zammetti <[EMAIL PROTECTED]> 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.

If I understand correctly, in CoR pattern a client calls the chain
head and "the request propagates along the chain until a
ConcreteHandler object takes responsibility for handling it." (GoF)

In Struts Classic prior to 1.3 a client calls a concrete action (which
is why I consider Struts Classic to *not* be an implementation of
Front Controller pattern). It is possible to stick additional
processing before the action class is called. Though it is not as easy
as in WebWork, it  is possible. So, Struts Classic implements
Interceptor pattern, not Chain of Responsibility.

So, how the whole thing works in 1.3? A client still calls a
particular mapping like in older Struts versions, right? Does this
mapping define a head of chain (CoR) or an end of chain
(interceptors)? If it defines the head of chain, is it still possible
to sneak interceptors into an arbitrary chain?

Michael.

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

Reply via email to