Random thoughts in a vacum

time to read 6 min | 1196 words

Chris Holmes responded to my post about not liking the P&P stuff. Specifically, he takes offence at my dismissal of CAB:

It’s possible that Ayende thinks it’s just a bloated IoC container not worthy to lick Castle’s boots.

I wouldn't phrase it like that, even if I would have agreed to this statement. I think that ObjectBuilder has a long way to go before it has feature parity with Castle Windsor, but that is different than "bloated... ... not worthy of licking my boots... ". Let us not dramatise this issue needlessly.

Now to the rest of the post. I am an ornery bastard, so I am going to go over a lot of the stuff that Chris mentioned that I think deserves a response. That is not everything by a long shot, but I am catching on my RSS/Email after 21 hours of travel, so I got my excuses.

Yes, we could sit down and write our own framework and it undoubtedly would be more lightweight than the CAB because it would serve just our purposes and not attempt to solve anyone else’s problems. But that takes time.

Not really, you implement what you need, and that is much less of what the CAB is trying to do. You would also build it while using it, which tend to give you much more real-world design, with all the rough spots removed or hidden.

Would it be acceptable for them to build Enterprise Library using Castle Windsor?

From a corporate culture alone, I would say that they can't do that. While the choice of tools would certainly affect the way the end result would be built, I don't think that it would significantly change the final product.

The fact that P&P has built their own tools, like ObjectBuilder and the Policy Injection Block, seems like an unfair reason to condemn the whole Enterprise Library. Like saying, “one aspect of this thing sucks, so the whole thing is useless to me.”

Actually, when the building blocks are not stable, there isn't much hope for the building. But that is just to debacle the statement, not to trash talk everything else.

Of course, that’s pretty Ayend’s modus operandi. If something is of no value to him personally, it must suck.

That is news to me, and frankly I find it offensive. I will say that something sucks if trying to use it will cause pain, not if it doesn't bring me any value.

When I read Ayende say that the P&P’s tools are “extremely complex” and “hard to use” I almost can’t believe it. Ayende is a smart guy. So how come he can’t grok Enterprise Library and the simplicity of the tools?

Thanks :-). What am I talking about when I am talking about complexing and hard to use is relative to the problem at hand. I want the simplest solution possible, because trying to solve business problems with pesky clients, hard time limits and changing requirements is hard enough. Simplicity is a goal we should all strive for. That is not to say that you should choose a solution that is too simple, because that would hinder your ability to handle the business scenario.

Here is a good metric that I like to use. Take an technology, and try to build it without any tool assistance. Is it still a good approach? If not, then there it is complex and hard to use. A lot of UI frameworks fails this test, by the way. WinForms certainly does, when you start to think about complex UI.

Ayende’s suggestion is often: cobble together your own solution.

Code word of the day: cobble. I had it thrown at me in the TFS vs. OSS stack as well. I am not a native english speaker, but I do believe that this carries with it negative conotations. My response to this: Mu.

How many developers need a framework like CAB?

Very few, actually. Better to ask, how many developers need a framework to help use MVC in WinForms, and the number would be very high (at least among the developers that know what MVC is). Frankly, I am not sure that an MVC framework is even needed in WinForms. You can probably get away with declerative event wiring alone, and even that I would keep to the more complex applications. MVC architecture I would start by default for everything but the smallest stuff, but MVC framework is not something that I would just start building.

I guess, more than anything, I’m just jealous of Ayende. I wish I were as smart and fast as he is. Because I know it would take me a lot longer than half a day to build a framework like CAB that had all of the features that CAB has.

You have nothing to be jealous about. I will let you in on my secret.

How to build the CAB in half a day: Don't build the CAB.

My main objection to the CAB is that it is too big and invasive. I wouldn't even try to do the same. My approach for this would be a lot simpler, a lot less powerful, and be easier to get starting with. I would grow it with need, so it is shaped by actual business need, not by BDUF though process.