Olaf Bergner wrote:
-----Original Message-----
From: Stephen McConnell [mailto:[EMAIL PROTECTED]
Sent: Friday, March 12, 2004 10:29 AM

A new binary snapshot of Merlin is now available.  The snapshot includes
support for the injection of classic avalon lifecycle artifacts via
constructor (including Logger, Configuration, Parameters, Context,
ServiceManager).



Though I do appreciate the hard work that went into this feature I fail to
see a need for it. Maybe it's just me but I always felt that
constructor-based dependency injection was so very ... clumsy. It simply
doesn't feel right, putting so much logic into a mere constructor. But then
again I have never been a fan of PicoContainer. No offence intended, but I
for one will stick with the classic Avalon way.

Hi Olaf:


The stuff that has been added is *not* Pico style dependency injection. I agree - the pico style is clumsy and opens the door to lots of inconsistencies. Instead this is classic Avalon lifecycle artifact injection - which means we preserve 100% of the Avalon semantics. The only change this introduces is an alternative delivery mechanism. For example this enables a component author to choose between Serviceable as a delivery mechanism as opposed to ServiceManager as a constructor argument as an alternative delivery mechanism.

The main benefits are:

* code simplification for the component writer

  * ability to use final state members (which adds improved
    compile type checking and reduced memory consumption)

  * ability to collapse all lifecycle setup into the constructor
    phase which in turn eliminates the possibility of errors
    arising from not declaring that a component implements
    a particular lifecycle interface

Cheers, Stephen.

--

|------------------------------------------------|
| Magic by Merlin                                |
| Production by Avalon                           |
|                                                |
| http://avalon.apache.org/merlin                |
| http://dpml.net/merlin/distributions/latest    |
|------------------------------------------------|

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



Reply via email to