Monday, May 24, 2010

Dependency Injection Pattern

Dependency pattern is best described in this article by Martin Fowler, and Dependency Injection is such a cross cutting concern throughout the Java ecosystem - its also a very well understood problem space with a small number of popular implementations. I can count them on fingers, Spring, Guice and JSR 299. And in popularity I think Spring has an advantage as spring does provides other modules which makes spring an easy candidate to pick for DI and other development. Guice was the first one to provide annotation in framework. Now, spring provides you various ways to wire things together like xml, annotation and java config.

here's good comparison between Guice & Spring....I found it very interesting..

No comments:

Post a Comment