What's in the Zone?

Archive for the ‘pattern’ Category

The Dependency Injection Meta-Container

Posted by indroneel on April 29, 2007

Of late, the dependency injection pattern has gained prominence as a common feature provided by many object-oriented frameworks. Included in this list are new entrants like JBoss Seam and Google Guice as alternatives to the more popular Spring framework. Existing platform, such as Struts and EJB, are also making a move towards this paradigm.

The prevalence of dependency injection has resulted in certain interesting possibilities that are mostly to do with interoperability, transparency and integration across frameworks and containers. In this article we shall take a closer look at these possibilities and propose solutions for the same. Read the rest of this entry »


Posted in design, framework, pattern, programming | 9 Comments »

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 | 12 Comments »