I’m in Redmond this week helping out Patterns and Practices with a focus group on the WPF Composite guidance that is going to be the successor to the CAB. Modular development is on everybody’s mind here, and the de facto solution for stitching all of the components together is some sort of IoC/DI tooling. Great, but one of the gripes about CAB is that it forces you to use the ObjectBuilder and many people want to use their own container. P&P is on the ball, so they’re planning to have some sort of way to swap out the IoC container. Great, but…
- The MVC framework guys are making the container swappable (and one of the highlights of my career was hearing ScottGu say “you could use StructureMap” out loud in the MVC unveiling).
- I saw a slide about Acropolis that had a block that said “Dependency Injection.”
- WCF arguably has a service locator built into itself.
- The Provider Model is effectively an implementation of Service Locator
It might be a good idea to finally put a very generic hook in the CLR Base Class Library to register an IoC container so that all these different pieces can start using a consistent IoC mechanism. I’m pretty sure I’ve heard or read Microsofties say that they’re considering it. I think I’m ready to vote for it. What do you think?