Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 47908 invoked from network); 10 Feb 2005 06:03:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 10 Feb 2005 06:03:27 -0000 Received: (qmail 43377 invoked by uid 500); 10 Feb 2005 06:03:22 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 43082 invoked by uid 500); 10 Feb 2005 06:03:21 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 43063 invoked by uid 99); 10 Feb 2005 06:03:20 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of craigmcc@gmail.com designates 64.233.170.205 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.205) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 09 Feb 2005 22:03:19 -0800 Received: by rproxy.gmail.com with SMTP id c51so62763rne for ; Wed, 09 Feb 2005 22:03:07 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=NfICinA02aeuVlMhTny/mVjYWd+dKFG73TcSLlIFA2yShl3c0yfoVz3JFnZE2viJfJ7PUyg6krohy4mAjNHUfWDCDFjaJrj2ysJ92qClN3pPLclPXnRyuzn5oaRNUfdkySq7ke4QDOOLIVfNE8mfhGR1cTMAqw1TFlVIIubjj0I= Received: by 10.38.171.5 with SMTP id t5mr172866rne; Wed, 09 Feb 2005 22:03:06 -0800 (PST) Received: by 10.39.3.22 with HTTP; Wed, 9 Feb 2005 22:03:06 -0800 (PST) Message-ID: Date: Wed, 9 Feb 2005 22:03:06 -0800 From: Craig McClanahan Reply-To: craigmcc@apache.org To: Jakarta Commons Users List Subject: Re: Chain: Is it really CoR or Template Method? or both? In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 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