Saturday, December 01, 2007

Why O Why

Glenn Block announced on the ALT.NET Yahoo Group that the P&P team is developing a new dependency injection framework. To say it with the words of Captain Alberto Bertorelli from the British sitcom Allo 'Allo:

"What a mistake-a to make-a!"

I mean, there is the wonderful Castle Windsor, the great StructureMap and the magnificent Spring.NET framework. Why is Microsoft reinventing the wheel again? Why is it possible for Scott Gu to provide test project templates for MS Test, NUnit  and MbUnit with the ASP.NET MVC framework and is it not possible for the P&P team to reuse the existing DI containers out there? Why is it possible for a company like Sun to cooperate with and leverage open-source projects and Microsoft seems to fail in this area?

Let's assume for a moment that this new DI container sucks less than ObjectBuilder, but that it can never compete with the existing feature-rich DI containers (seems like a very realistic scenario to me). I can see the discussions coming in my company as to why our team doesn't (want to) use this new shiny DI container from Microsoft as opposed to Castle Windsor and that we should start migrating. What a PITA!


Glenn said...

They don't have to. We're building a new container that is truly stand alone. The newer deliverables will all be DI agnostic as to the specific container so you can use your own. For customers that don't (can't) use OSS offerings they can use this container. For customers that have Castle, Spring, etc they can use those. For more information see Grigori's blog (

Jan Van Ryswyck said...

The fact that you guys are opening things up for other Ioc containers looks very promising. I'm still a bit sceptical on the new Ioc container thingie. Although I seem to get critical on you guys from time to time, I very much appreciate what the P&P team is doing (see also