Wednesday, February 13, 2008

Grigori Melnik just blogged about the release of the first CTP for the Unity Framework. It can be downloaded from codeplex here.

I think I mentioned Unity before. The Unity framework is build on top of ObjectBuilder2. ObjectBuilder2 seems a much better factory system than ObjectBuilder (infamous for it's bloated misuse in CAB). I have been following along with some sample on how to use ObjectBuilder2 and I quite like it. Obvious, nowhere near as powerful as Windsor, Spring.Net or StructureMap yet, but I understand Microsoft needs it's home-grown factory system, and ObjectBuilder2 seems easy enough to use.

The Unity framework uses ObjectBuilder2 to provide a IOC. It can be used like so:

UnityContainer container = new UnityContainer() 
                  .Register<ILogger, TraceLogger>() 
                  .Register<ISomething, Something>()
                  .Register<ISomethingElse, SomethingElse>();

container.Get<ISomething>();

I'll certainly be looking into it!

Wednesday, February 13, 2008 10:40:19 AM (Romance Standard Time, UTC+01:00)  #    Comments [0]  |  Trackback
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):