Sunday, December 13, 2009

Inversion of Control

With the latest Genwise Software factory project we are using a pattern that is called Inversion of Control, or also known as Dependency Injection (what's in a name). Getting our heads around this pattern took a while and it was hard to find a simple sample that just demonstrates the simplest implementation of this technique. (more complex implementations using service locators can be found elsewhere). In this simplest sample a movie database printer prints movies from different movie sources. One is supposed to be memory and the other a text file.

You can download the sample here