cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ezkovich Glen <>
Subject Re: [RT] Simplifying component handling
Date Tue, 03 Jan 2006 16:38:16 GMT

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

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

View raw message