On Friday 12 March 2004 22:54, Olaf Bergner wrote: > 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.
It is not certain whether this will reach 'Framework Level", and should be seen as a first step to get a feeling for alternate ways of doing things. The main argument for Constructor based injections, are an OO principle that an Object is NOT in a defined state from the constructor is invoked until the constructor is completed, but it after that IS fully initialized. Few people live by this principle, and have all kinds of post-constructor initialization, and we (at least some of us) don't think so much about it. However, I put in a fair amount of code in my components to ensure that they are completely initialized prior to be ready for service, and all of that could be removed for a constructor injected component. We'll see how this goes... Niclas -- +---------//-------------------+ | http://www.bali.ac | | http://niclas.hedhman.org | +------//----------------------+ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
