Monday, March 10, 2008

Unity, A dependency injection container

Dependency Injection is a technique to achieve loose coupling as it allows to manage dependencies between objects by injecting the objects in a class instead of directly instantiating the objects by the class. The pattern can be used to decouple the cross cutting functionalities like logging, authorization from actual business logic in a class.

Microsoft Patterns & Practice group recently launched a light weight dependency injection container called Unity providing implementation of the pattern. I found two good reviews of Unity, one by David Hayden and another one by Oren Eini.

No comments: