got net?

Kevin Hazzard's Brain Spigot

About the author

Welcome to Kevin Hazzard's blog.
E-mail me Send mail

Recent posts

Recent comments

Authors

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010

A Survey of Popular .NET Inversion of Control Containers

UPDATE: Gaja Kannan attended this presentation and gave me a great link to a post by Torkel Ödegaard concerning IoC container performance. Interestingly, of all the IoC containers out there, Torkel picked the same products as I did (plus StructureMap) for his tests. You can find the post at http://www.codinginstinct.com/2008/08/castle-windsor-dependency-lookup-and.html. Thanks, Gaja, for the link! 

On Thursday, October 2, 2008, I gave a presentation to the Richmond .NET User Group entitled "A Survey of Popular .NET Inversion of Control Containers". It covered Microsoft Unity, Ninject, Castle Windsor and Spring.NET. I talked about the history of the development of Inversion of Control (IoC) and Dependency Injection (DI). I demonstrated the concept in a sample application (linked below). I also discussed Aspect-Oriented Programming (AOP) and how it can be used to create highly cohesive, loosely coupled applications. The slide deck and code is available at the links below.

Source Code (77 kB)   Slides (268 kB)


Tags: , ,
Posted by kevin on Thursday, October 02, 2008 6:30 PM
Permalink | Comments (4) | Post RSSRSS comment feed

Comments

Chris Stewart United States

Friday, October 03, 2008 9:05 AM

Chris Stewart

Kevin,

I'm having issues downloading the Powerpoint presentation.  The file I get is labeled "A".

Kevin Hazzard, MVP United States

Friday, October 03, 2008 10:39 AM

Kevin Hazzard, MVP

Thanks, Chris. Better testing, right? The presentation file name had spaces in it so I replaced them with hyphens. You can download the slides now.

Jonathan Pryor United States

Friday, October 03, 2008 2:40 PM

Jonathan Pryor

~Completely unrelated, but since dependency injection is frequently used to permit testing, you might find the Google Testing blog interesting reading...

http://googletesting.blogspot.com/

The current entry (http://googletesting.blogspot.com/2008/10/to-new-or-not-to-new.html) discusses how DI isn't appropriate everywhere, e.g. you wouldn't want to use DI to provide `string` constructor parameters, or `int` parameters, etc., so it's useful to formally distinguish between types which should be used with dependency injection and those which shouldn't.

Kevin Hazzard, MVP United States

Saturday, October 04, 2008 10:38 AM

Kevin Hazzard, MVP

Very true, Jonathan. When you hear people say, "Every class is an service," it's OK to be a bit nervous about that. Those are your instincts speaking. We sort of implicitly know that classes represent contracts but that they aren't appropriately exposed as services using an IoC container or, worse still, an SOA framework like WCF. I like the "to new or not to new" phrase. That's cool. Thanks for the links.

Comments are closed