NeelZone

What’s in the Zone?

  • Subscribe

  • Browse By Month

    April 2007
    M T W T F S S
    « Mar   Jun »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    30  
  • Archives

  • a

  •  

Archive for April 4th, 2007

Injection and Inversion

Posted by indroneel on April 4, 2007

A lot of programmers I interact with are unable to differentiate between dependency injection and inversion of control. Thanks to the popularity of Spring framework and EJB 3.0 there is now a tendency to use these terms interchangeably, even as they represent distinctly different concepts, resulting in a lot of ambiguities.

Inversion of control has its antecedents in the Hollywood principle (don’t call us, we’ll call you) and is not a design pattern. Rather, it is a general principle that is realized in multiple design patterns. Dependency injection is one such pattern that builds on top of this principle. Inversion of control is one of the tenets for all object-oriented frameworks, but not all object-oriented frameworks provide the features of dependency injection. Read the rest of this entry »

Posted in design, framework, pattern | 8 Comments »