In the Java community there's been a rush of lightweight containers that help to assemble components from different projects into a cohesive application. Underlying these containers is a common pattern to how they perform the wiring, a concept they refer under the very generic name of "Inversion of Control". In this article I dig into how this pattern works, under the more specific name of "Dependency Injection", and contrast it with the Service Locator alternative. The choice between them is less important than the principle of separating configuration from use.
Martin Fowler (b. 1963) is a software engineer, Chief Scientist at ThoughtWorks, and an outspoken advocate for best practices in enterprise software design, particularly in regard to agile software development methodologies, including extreme programming.
This is an extremely handy overview of dependency injection. I was pretty confused about halfway through, but as it gets into the tradeoffs between implementation choices in the second half I began to get a handle on both the differences and the reasons why one is better in a given situation than another. I'm sure I'll be coming back to this again as soon as I'm faced with a direct need.