Keyvan Nayyeri

My daily musings about software and technology

Slides of My Presentation on Inversion of Control Containers and the Dependency Injection Pattern

Photo taken from http://www.heartmonitors.com/media/catalog/product/cache/1/image/5e06319eda06f020e43594a9c230972d/t/e/teeter_EP_550-inversion_table_45-rest.jpg As a part of syllabus for our graduate Software Engineering course, every student is supposed to choose a Software Engineering paper and give a presentation based on it in the class, and answer to questions introduced by other students.

Today it was my turn to give my presentation and I had chosen the famous article by Martin Fowler on Inversion of Control Containers and the Dependency Injection Pattern. The main reason for choosing this paper was that I was very familiar with this article as I had read it before and I had applied the Dependency Injection pattern in many projects.

I had decided to incorporate ASP.NET MVC 2.0 and Ninject to write my examples for this presentation but due to the time limitation and the fact that my audience were not familiar with these technologies, I decided to give a simplified description of the original paper by Martin Fowler. I also had included some funny pictures that I eliminated in the final review because I’d prefer to have more formal presentations rather than funny presentations like those that Scott Hanselman and Phil Haack have!

The presentation begins with a short introduction of the main goal of the discussion and follows by giving a naive example of Inversion of Control to describe the concept. Then it talks about Dependency Injection including its three main styles called Constructor Injection, Setter Injection, and Interface Injection. The presentation also covers Service Locator pattern and some improvements to it like Segregated Interface and Dynamic Service Locator. Finally, the presentation ends with addressing three important comparisons between techniques and concepts covered: Dependency Injection versus Service Locator, Constructor Injection versus Setter Injection, Declarative versus Programmatic Configuration.

I’ve uploaded my slides so you can download them from here.

2 Comments

Pazooki
Mar 23, 2010 8:00 AM
#
Nice Presentation,
TNX for share

MohammadReza
Mar 24, 2010 1:14 AM
#
Hi mate!
Nice blog! Nice contents!
Nice to see you :)

Leave a Comment