commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <craig...@gmail.com>
Subject Re: Chain: Is it really CoR or Template Method? or both?
Date Thu, 10 Feb 2005 06:03:06 GMT
The key reason I think of Commons Chain as implementing CoR is that
any given command in the chain can say "that's it; this 'request' has
been handled; do not go any further," which is part of the classic
description of this pattern.  That happens to not be the way that
things like the request processor deconstruction in Struts 1.3.x are
using it for, but this usage is still viable if you need the "keep
delegating until you find someone who will deal with this problem"
approach.

Craig


On Wed, 09 Feb 2005 22:12:18 -0500, Bill Siggelkow
<billsigg@bellsouth.net> wrote:
> The documentation and API of commons-chain frequently refers to the
> chain of responsibility pattern; however, my first impression was that
> its more like the Template Method. I would be interested in how others
> perceive this ... in either respect, I'm inclined to consider chain to
> be a melding of the two (plus the Command and Composite patterns thrown
> in). Certainly the "handling" aspect of Commons-chain commands stem from
> the CoR pattern. However, the notion of defining a sequential set of
> commands, using either the XML config file or the API, feels like
> Template Method.
> 
> I realize that this is a somewhat academic discussion; however,
> understanding the common patterns underlying chain help us frame its
> applicability to the general public. I'm also writing an article on
> commons-chain and have been puzzling over this issue.
> 
> -Bill Siggelkow
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
>

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


Mime
View raw message