views:

1030

answers:

3

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?

+8  A: 

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:

Mark Seemann
Thank you very much Mark. I appreciate the help :) .
Night Shade
+4  A: 

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.

Krzysztof Koźmic
Thanks to you too :)
Night Shade
A: 

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

shariq
Hi Shariq, this site is not a regular forum, please take a look at the FAQ: http://stackoverflow.com/faq
Mauricio Scheffer
@Shariq: I would have told you the same thing as Mauricio said. But since you asked, I can only say this: It is a dependency injection tool that helps to modularize a software application and encapsulates cross-cutting concerns. For better understanding, go to this link : http://en.wikipedia.org/wiki/Dependency_Injection
Night Shade
You should have tried the search function. There are plenty of questions that already discuss it well, or if it is not enough, ask your own question.
Venemo