Good Read: MSDN Dependency Injection

Image from MSDN URL

You have probably heard about the Factory Pattern and the separation between the interface and the implementation using services, where the client objects are often responsible for service location.
The Dependency Injection pattern is a particular implementation of Inversion of Control. Inversion of Control (IoC) means that objects do not create other objects on which they rely to do their work. Instead, they get the objects that they need from an outside source (for example, an xml configuration file).
Dependency Injection (DI) means that this is done without the object intervention, usually by a framework component that passes constructor parameters and set properties."

Paragraph from articleASP.NET MVC 4 Dependency Injection

Fantastic read about these patterns at MSDN location.

Recommend both links.

Next Post »