Hi folks,

I think I have been out of the loop - are we talking about DI of
services (i.e. no call to ServiceManager) or injecting complex data
objects?

Cheers,

Siegfried Goeschl


Leo Simons wrote:
> On Tue, Aug 11, 2009 at 10:44 AM, Robert Burrell
> Donkin<robertburrelldon...@gmail.com> wrote:
>   
>> avalon is an IoC container but is mainly tooled for composition using
>> the Service Locator pattern (Servicable, ServiceManager). these days,
>> dependency injection (whether through setters or constructors) is much
>> more popular. so, i think we should add setters, getters and
>> constructors so that Servicable components can also play well in DI
>> containers.
>>
>> opinions?
>> objections?
>>     
>
> The avalon lifecycle interfaces have this nice container-provided
> guarantee that after the last few of them have been called, you know
> your component is in a fully initialized state, fully aware of its
> surroundings, and that those surroundings won't change after that
> (unless you implement Re* which is again a set of specific contracts).
>
> While I think its quite alright to add support for dependency
> injection, I think it is important to keep this
> guaranteed-to-be-initialized-at-an-obvious-point-in-time contract
> intact. That's trivially true if you use constructor DI, but not so
> much so if you add setters, so I'd rather not see any setter
> injection.
>
> Make sense?
>
> cheers,
>
> - Leo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@excalibur.apache.org
> For additional commands, e-mail: dev-h...@excalibur.apache.org
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@excalibur.apache.org
For additional commands, e-mail: dev-h...@excalibur.apache.org

Reply via email to