January 19, 2012

Dependency Injection IoC

"Dependancy Injection" is a more specific name for and term used "Inversion of Control".

It's all about letting client developers of your code add there own implementations. To do this your code needs to be very loosly coupled (i.e. none of the usual newing up of concrete classes, the code must be written using Interfaces for example) and configurable (e.g. the client developer drops their implementation dll into a location and adds content to a XML configuration file to tell your host app what class to load and instantiate from the dll).

This is a good intro to "Dependancy Injection" http://www.martinfowler.com/articles/injection.html

These are intros to Microsofts "Dependancy Injection" framework, Unity.

https://www106.livemeeting.com/cc/wwe_us/view?cn=guest&id=1032382093&pw=23D44136 with sourcecode at http://unity.codeplex.com/wikipage?title=Webcast%20demos&referringTitle=Home