Inversion of Control Containers and the Dependency Injectionpattern
Inversion of Control Containers and the Dependency Injectionpattern
Submitted by martinfowler.com on Sat, 17/07/2004 - 01:11.In the Java community there's been a rush of lightweightcontainers that help to assemble components from different projectsinto a cohesive application. Underlying these containers is a commonpattern to how they perform the wiring, a concept they refer under thevery generic name of "Inversion of Control". In this article I diginto how this pattern works, under the more specific name of"Dependency Injection", and contrast it with the Service Locatoralternative. The choice between them is less important than theprinciple of separating configuration from use.
