I was just reading the “hot” news that Unity 2.0 for Desktop and Silverlight was released. Now you mention it, the release was about a year ago. I agree, but it was its project description that got my attention.
The Unity Application Block (Unity) is a lightweight extensible dependency injection container with support for constructor, property, and method call injection.
So, what is Unity and why do we need it?
Unity is a container that is equipped with all plumbing necessary for creating loosely coupled component-based applications. It is a container because you can – so to speak – stuff all kind of components in it, as long as they conform to a predefined interface. It even becomes more handy when you stuff it with cross-cutting concerns, like aspect oriented validation.
Unity uses dependency injection as its prime technique for building loosely coupled applications and, thus, provides several ways to handle the dependencies between objects.
Dependency injection containers are, however, far from new. It was in 2004 that Martin Fowler published Inversion of Control Containers and the Dependency Injection pattern.
Thus, I guess it should be mainstream technology by now. It should be… is it?