Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 35591 invoked from network); 3 Jan 2006 16:38:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jan 2006 16:38:54 -0000 Received: (qmail 90529 invoked by uid 500); 3 Jan 2006 16:38:52 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 90449 invoked by uid 500); 3 Jan 2006 16:38:50 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 90438 invoked by uid 99); 3 Jan 2006 16:38:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 08:38:50 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [68.99.120.68] (HELO dukecmmtao01.coxmail.com) (68.99.120.68) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 08:38:49 -0800 Received: from [192.168.1.101] (really [70.116.10.167]) by dukecmmtao01.coxmail.com (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060103163916.TWTD1312.dukecmmtao01.coxmail.com@[192.168.1.101]> for ; Tue, 3 Jan 2006 11:39:16 -0500 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: References: <43B9164F.5080201@apache.org> <43B95C08.8010602@dslextreme.com> <7557e99f0601020933xe119a58j588921935798ba63@mail.gmail.com> <43BA239A.5000200@apache.org> <43BA403D.7000701@apache.org> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Ezkovich Glen Subject: Re: [RT] Simplifying component handling Date: Tue, 3 Jan 2006 10:38:16 -0600 To: dev@cocoon.apache.org X-Mailer: Apple Mail (2.746.2) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Jan 3, 2006, at 9:06 AM, Peter Hunsberger wrote: > On 1/3/06, Giacomo Pati wrote: >> >> I'm with Sylvain's and Gianugo's oppinion. I also see users getting >> confused with multiple choices of "how to write a component". I'd >> say in >> this area we need a revolution instead of an evolution. > > I really don't get this objection; if I see a class that allows > constructor injection OR can be initialized via some other sequence > I'm going to think "gee, that's nice, I can do everything in one shot > instead of having to call the service manager" (or whatever) . All > that's required to make sure that's clear is about 2 lines of Javadoc > on the constructor and if that's missing and someone does try to > initialize the class both ways you can probably make sure it either > blows up or handles things gracefully. > > We use constructor injection in some of our code. It's clean, it's > simple, it's easy to write. Sometimes we support multiple methods of > initializing the code. It's pretty darn clear what's going on to any > user of the code. As a Cocoon user I really think that any objection > to this proposal based on "it might be confusing to users" is bogus... I agree. This is a minor simplification directed towards developers. If they can't figure out when and when not to use this then they need to learn. The fact that this buys you very little is a different concern. Sometimes we spend a bit more then we should for little luxuries, but we're willing to eat bread and water as a result. Just make sure Carsten is the one who suffers for this luxury ;) Glen Ezkovich HardBop Consulting glen at hard-bop.com A Proverb for Paranoids: "If they can get you asking the wrong questions, they don't have to worry about answers." - Thomas Pynchon Gravity's Rainbow