Jeremy D. Miller -- The Shade Tree Developer

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that

In case you haven't already seen the announcement or Ayende's denouncement, the Patterns and Practices team is going to build a new Dependency Injection Application Block as part of the next wave of the Enterprise Library.  As the primary builder of one of the Open Source IoC/DI tools you'd expect me to be indignant about this, but I'm not.  I was certainly peeved about ObjectBuilder a couple years ago, but this time is different.  Partially it's because I've always assumed that they'd get around to this at some point, so it's not any great shock.  I'm not particularly upset because of a couple reasons:

  1. The P&P team reached out to me for input on their new DI tooling.  I also know that they're talking to some of the other teams as well.  I still think the P&P guys could have, and should have, done this with ObjectBuilder.
  2. They said the magic words:  we're going to make it pluggable so you can swap out the base implementation for StructureMap, Windsor, or Spring.Net.  That's a huge acknowledgement of the success of these tools from the P&P team.  Exactly what we've been waiting for from these guys for a long time. 
  3. They might build something better or at least innovative.  There's absolutely no doubt in my mind that I could build a better StructureMap from scratch today after 4 years of actually using IoC tools.  They get to start at the end of that experience curve.  Of course, if mainstream developers start to use IronRuby, IoC rapidly loses its relevance, but let's not get side tracked here.
  4. All of us consultants sooner or later get forced to work for a company with a strict no OSS policy.  Since I really don't care to write an IoC tool from scratch (and I really don't care for ObjectBuilder), it's nice to have something usable from MS itself that I can sneak in.  Of course, in reality I'd just download the StructureMap source code and replace "StructureMap" with "NameOfCompany.IoC."
  5. I think Enterprise Library could be a lot more usable if they really embrace Dependency Injection throughout.  There are pieces of EntLib that I think would be useful, but I don't want to bring in all the dependencies or wrestle with the Xml configuration.  Using DI for configuration generally means that your classes are less coupled to some sort of underlying Xml configuration.  I think applying Inversion of Control to configuration (I don't go get my application settings myself, somebody else will do that for me in my constructor) will make the EntLib easier to digest.
  6. The newer P&P framework and factory thingies can be built with IoC/DI from the ground up.  If we're going to restrict ourselves to static typed languages for the time being, I want enterprise systems and frameworks built with IoC.  Even more importantly, I can use the tool of my choice that I'm already familiar with for configuration of my services.  That's a big win.

CodePlex notwithstanding, Microsoft's poor attitude and relationship to Open Source Software efforts on the .Net platform has had a negative impact on the community at large.  That out of the way, let's give P&P a chance here.  They did come out and ask for involvement from us.  We've been whining that they don't include us or take feedback early on.  Here's our chance.  Instead of throwing rocks at them, let's try to participate in a helpful manner.  Maybe we can set Microsoft and us up to avoid more Entity Framework debacles.

 

 

 

As for the competition angle between StructureMap/Windsor/Spring.Net and DIAB, think of the branding.  Calling anything the Something Application Block and putting it next to the original OSS tools is a lot like putting the cheap knockoff cereal boxes right next to Lucky Charms in the grocery store.  Doesn't Dependency Injection Application Block sound a lot like a generic cereal to you?


Posted 12-03-2007 7:53 AM by Jeremy D. Miller
Filed under: ,

[Advertisement]

Comments

Windows Vista News wrote Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-03-2007 9:00 AM

Did you see the post at codebetter.com

Ayende Rahien wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-03-2007 9:55 AM

> Doesn't Dependency Injection Application Block sound a lot like a generic cereal to you?

LOL

Jeff Perrin wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-03-2007 3:33 PM

"you can swap out the base implementation for StructureMap, Windsor, or Spring.Net"

Does that not strike anyone else as being funny?

Jeremy D. Miller wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-03-2007 3:56 PM

@Jeff,

Yes, yes it does.  We're going to swap out the engines on the fly that allow you to swap out services on the fly.

stefan.moser wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-03-2007 4:02 PM

The problem is that too many people are going to think that DIAB is the Lucky Charms.  We use NHibernate and a lot of developers on my team have recently been saying that they can't wait to sub it out for the Entity Framework.  Then I need to go into my long-winded speach about Persistence Ignorance.  Argh!!

Barbricks.Com » Microsoft P&P is building a new IoC/DI tool — and I'm okay with that wrote Barbricks.Com » Microsoft P&P is building a new IoC/DI tool — and I'm okay with that
on 12-04-2007 1:44 AM

Pingback from  Barbricks.Com » Microsoft P&P is building a new IoC/DI tool — and I'm okay with that

David Hayden [MVP C#] wrote Enterprise Library 3.5 Just Became Enterprise Library 4.0 - Dependency Injection Application Block
on 12-04-2007 11:33 AM

Grigori Melnik, product manager for Enterprise Library, just announced that- "With the upcoming

David Hayden wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-04-2007 12:18 PM

Jeff, Jeremy-

The Application Blocks in Enterprise Library are provider-based. So, they are probably providing a base abstract provider class that serves as the API and creating one implementation that provides dependency injection services ( think of membership and role services in the .NET Framework and the provider model ).

Others can then come along and create other implementations that use other dependency injection tools.

I am guessing, of course, but this would be consistent with the other application blocks.

Jeremy D. Miller wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-04-2007 12:28 PM

@David,

So, we're going to use an extremely poor implementation of IoC (the Provider model) to switch out the underlying IoC tool.  Still ironic and kinda funny.  Not that I'm complaining.

David Hayden wrote re: Microsoft P&P is building a new IoC/DI tool -- and I'm okay with that
on 12-04-2007 12:46 PM

Basically - It's not the actual provider model in the .NET Framework, but a provider-based approach to providing services.

I think we need to just wait and see. Enterprise Library will be much more excellent when we get OB out of there, and a powerful combination of the DIAB and the PIAB ( Policy Injection Application Block providing AOP services ) will be very useful. I just hope they put in an additional lightweight interception mechanism into the PIAB.

Jeremy D. Miller -- The Shade Tree Developer wrote The Dependency Injection Application Block from Patterns and Practices
on 12-12-2007 6:18 PM

In case you've missed it, Grigori Melnik has announced that the forthcoming version of the EntLib

Enterprise Library 4.0 « My kemenworld… wrote Enterprise Library 4.0 « My kemenworld…
on 12-20-2007 11:55 AM

Pingback from  Enterprise Library 4.0 « My kemenworld…

Dan Rigsby - Coding Up Style » Blog Archive » Enterprise Library 4.0 Product Backlog Available wrote Dan Rigsby - Coding Up Style » Blog Archive » Enterprise Library 4.0 Product Backlog Available
on 01-09-2008 7:22 AM

Pingback from  Dan Rigsby - Coding Up Style  » Blog Archive   » Enterprise Library 4.0 Product Backlog Available

http://139641.subversion.codebetter.com/blogs/jeremy.miller/archive/2007/12/03/microsoft-p-amp-p-is-building-a-new-ioc-di-tool-and-i-m-okay-with-that.aspx wrote http://139641.subversion.codebetter.com/blogs/jeremy.miller/archive/2007/12/03/microsoft-p-amp-p-is-building-a-new-ioc-di-tool-and-i-m-okay-with-that.aspx
on 03-23-2008 3:23 AM
http://sourcesafe.codebetter.com/blogs/jeremy.miller/archive/2007/12/03/microsoft-p-amp-p-is-building-a-new-ioc-di-tool-and-i-m-okay-with-that.aspx wrote http://sourcesafe.codebetter.com/blogs/jeremy.miller/archive/2007/12/03/microsoft-p-amp-p-is-building-a-new-ioc-di-tool-and-i-m-okay-with-that.aspx
on 03-28-2008 5:54 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?