Inversion Of Control

A very good text titled Inversion of Control Containers and the Dependency Injection Pattern can be found at MartinFowlers bliki: http://www.martinfowler.com/articles/injection.html.

See HollywoodPrinciple.

Related concepts: DependencyInjection, SetterInjection, ConstructorInjection, TheGuiThreadIsTheMainThread


When did InversionOfControl change from a term describing how I/O is performed in event-driven operating systems and frameworks into a term that means "pass an object's dependencies to the constructor" which is just normal object-oriented programming?

Event driven I/O frameworks are instances of IoC, not the definition. It doesn't mean passing anything to constructors. See HollywoodPrinciple and Martin Fowler's article for more.

IoC, as another term for DependencyInjection, is just passing things to constructors.

So, I suppose I should get rid of all those non-constructor @inject statements in my Java code then. CLEARLY, they're not IoC or DependencyInjection. No siree. You got me -- I'm caught.

@inject still applies (or is intended to apply) at construction time of the object.


CategoryPattern CategoryEvents


EditText of this page (last edited April 26, 2012) or FindPage with title or text search