Castle Windsor vs writing your own

Earlier this week I was in a meeting were someone stated that it was better to write your own IOC container than just using an existing one (the most excellent Castle Windsor in this case). I was just baffled to hear such statements.

The argument for writing your own container was simplicity and the learning curve for new developers on the team. I strongly disagree.

I can’t think of anything simpler than downloading an existing IOC container that has a near flat-line learning curve, like the Castle Windsor container. About a year ago, I introduced it into the team. No learning problems whatsoever. Just read two blog posts about it and you are on your way

But the main reason I disagree is that I strongly believe that we have to provide business value instead of writing yet-another-IOC-container. We have to solve the problems of our customers. They simply don’t care about IOC containers.

Scott Hanselman has a nice list of Dependency Injection Containers. Pick, choose and get over it!

3 thoughts on “Castle Windsor vs writing your own

  1. I could not agree with you more on this Jan, with so many IOC contains out there, they can’t find one that fits their needs and being that you have already introduced Castel Windsor seems like a no brainner. I see this all the time in companies, their engineers like to reinvent the wheel all the time and forget that the true nature of our jobs is to provide business solutions to our customers. You are so correct, our customers do not want you spending time building IOCs (a commodity in our circles), they want their use cases implemented.

    I have been on several LOB (line of business) architecture teams that made the choice to roll their own solutions patterning them off various open source projects (picking and choosing through the source code). And a year later they had a nice clean solution . The irony is, that after the custom solution was in production for a while features had to be added back in to meet those edge case needs. Before long their custom solution closely resembled the original project they patterned their custom solution after. Additionally they could not get the benefits of the enhancements to open source community had been making over that year of time. The short answer, they wasted a year of their customers time, and they wonder why the executives are always looking at these cheaper off-shoring alternatives. We do it to ourselves.

    I tend to live by the old 80% rule. If there is a solution that can get us 80% where we need to be then the team better have a darn convincing arguments to deviate and roll their own solution.

  2. Hi Scott,

    Nice to hear that finally someone agrees with me on this one ;-). Let me add to this story that the people I was discussing this with only use their home-grown container in the most basic scenario possible. When I briefly explained to them some more nice features of Castle Windsor, the only thing they were considering is expanding the features of their own container.

Comments are closed.

Find me

RSS
Facebook
Twitter
LinkedIn

Disclaimer

The opinions and content expressed here are my own and not those of my employer.