Yesterday I was reading some articles in this site while I stumbled on an article about this two new IoC tools. Which one should I learn first? Is there some specification about which one should be used when?
Neither Castle.Windsor or Spring.NET are new.
- Castle Windsor have been around since late 2004
- Spring.NET have been around since early 2006
They are two comparable DI Containers that essentially aim at providing the same services, so you don't need to learn one before the other, and neither do you need to consult any kind of specification on when to use which one.
I've been using Castle Windsor for about half a year and am generally happy with it. Spring.NET I have yet to look at, but it looks like it is very closely tied to the configuration system and doesn't support programmatic registration, and if this is true, that would be a major drawback in my eyes.
Castle Windsor and Spring.NET are not the only DI Containers available for .NET. Here's a larger list:
I'm one of the committers to Castle project (which includes Windsor) so I may be biased, but.
Windsor is very extensible, allows you to tune and bend it to your needs. It provides nice fluent registration API so that you don't have to write ton of XML. There are also tons of extensions that you can use to integrate Windsor with other frameworks, like ORMs communication frameworks (WCF, NServiceBus) etc.
Plus it has a very active and responsive community, so if you have any questions, they'll get answered fairly quickly most of the time.
Hi,
Actually we are using Castle Windsor in our application for wcf services but trully speaking i am not getting the pupose of Castle Windsor. so please can you explain about it. it.
Thanx & Regards, Shariq