Monday 30 August 2010

Is Inversion of Control the Same Thing as Dependency Injection?

In the 2004 article Inversion of Control Containers and the Dependency Injection pattern, Martin Fowler discusses Dependency Injection vs. Service Locator patterns. The author states that Inversion of Control is too generic a term and settles for Dependency Injection. The answer to the question "Is Inversion of Control the Same Thing as Dependency Injection?" seems to be "Yes", at least as far as Java EE containers are concerned.