Simple Web Application Block Gets Unity Dependency Injection Support
by David Hayden, Florida ASP.NET Developer
So with all this talk about the Unity Dependency Injection Container you are probably wondering if Unity will be supported in the next version of the Web Client Software Factory, assuming there is a next version. Okay, my mistake, first you are probably wondering when the Web Client Guidance Bundle will work in Visual Studio 2008, and then you are wondering about Unity Support :)
Alright, I am teasing I know, but the truth is that 3rd party dependencies stink when developing applications. They are inevitable, but they stink. And one of my concerns is being too dependent on 3rd party libraries, like the Composite Web Application Block, Enterprise Library, and ObjectBuilder.
One of the first things I did when the Composite Web Application Block came out is to create my own version, the Simple Web Application Block. This is the Composite Web Application Block without dependencies on Enterprise Library and ObjectBuilder. I replaced ObjectBuilder with my favorite IoC, Castle Windsor, and added StructureMap support as well to make sure I indeed had the ability to switch out IoC Containers.
I have a few posts here about the Simple Web Application Block:
So you can probably guess what has been on my mind lately. Let's add Unity Support! All I need to do is create a simple adapter for Unity and all should be fine. About 1 hour later Unity now works with the Simple Web Application Block. No waiting!

Now just so you know, this wasn't all about playing ( only 90% ). I have a client right now where we are using the Simple Web Application Block and they wanted to make sure I could move to Unity when it comes out. Of course, we can...
Unity Tutorials
Author: David Hayden, Florida Web Developer