Sunday, December 02, 2007

Why O Why - The Day after

Alex Henderson picked up on my "Why O Why" post in his take on the Pluggable IoC in WPF Composite & Enterprise Library v.Next.

I still believe that an IoC Application Block in the next version Enterprise Library is not a good thing. There are a number of very talented people working on existing open-source DI containers for a long time now. Their efforts do not only involve providing source-code to these open-source projects, but also teaching a community on how to write better and maintainable applications. Instead of rewarding and honoring these very talented guys 'n dolls, Microsoft decided to ignore their work and provide their own (Oren has a point here).

Isn't it possible for the P&P team to pick the three most commonly used DI containers out there, write a provider model for them and use these in the Enterprise Library and the WPF Composite framework. Provide the means for other DI containers out there to write providers of their own so that their communities can use the P&P stuff with their own favorite container. How hard can it be? Maybe I'm being a bit too simplistic about it, but I hope you'll get my point here. 

I agree that providing an IoC Application Block in the Enterprise Library would reach a lot more developers than is the case today. But a completely new DI container written by the P&P team only adds to the underlying problem here. This underlying problem is the fact that most developers in the .NET community only look at what is coming from Microsoft and that's it. If the P&P team would have the courage to stand up, provide some existing DI containers out there today, these developers could come to the conclusion that the .NET community != Microsoft.

Scott Gu seems to get it! Not only by opening up the ASP.NET MVC framework, but providing support for the xUnit frameworks that exist out there today.

I shiver on the thought of what is next. A Mocking application block? My two cents.

3 comments:

bittercoder said...

I absolutely agree with the sentiment, I mean the problem here is obviously the alt in alt.net ... and a move like that from Microsoft would certainly give the alt.net IoC offerings an equal footing, as it stands the technologies are relegated to the "backup plans" should the Microsoft offering not deliver, but at least there's some accomodation for them at all - it's not perfect - but we're still "better off" then we were before.

Personally though, at least for the Ent. Lib - most containers supersede it entirely once combined with all the bundled facilities and services - I'm not sure I see much synergy there unless they can decouple of the various services from the Ent. Lib itself so we can re-package Ent. logging etc.

bittercoder said...

oh, and an MS Mocking framework is definitely worthy of shivers! Ack - though I might be in favor if they decided to acquire a company (say TypeMock :) and approach from that angle, that would also work better with the legacy code bases out there that aren't test-friendly, so they don't end up closing out an existing company, but bringing them internally. And still leaves plenty of room for more lightweight solutions like RhinoMocks, NMock etc.

Jan Van Ryswyck said...

Earlier this year, we had a discussion at work as to why our team is using NUnit instead of MS Test and if we were willing to start using MS Test. I asked why we should stop using NUnit. Besides, the only reason why I would stop using NUnit is when I wanted to start using MbUnit. The answer: because it's from Microsoft! We had to jump some hoops in order to preserve our current choice. Thats the kind of environment I work in. If it comes from Microsoft or we wrote it ourself, then it's a good thing by default. Everything else is crap. I just hate this kind of approach to software development and it wears me out without any additional value.

Now I'm trying to introduce Castle Windsor in projects where it makes sense to use an IoC container. I don't have to tell you that its a great tool. The articles on your blog helped me out a lot in order to start using it. Now I can see a new discussion coming when the IoC Application Block becomes available. I don't have a problem with it, if it is at least as lean and mean as the ones that are available now, which I don't believe that it will be the case.

Well, I'm glad that at least MS Mocking gives us both the shivers :-)