温莎城堡或Spring.NET-优点和缺点 [英] Castle Windsor or Spring.NET - advantages and disadvantages

查看:72
本文介绍了温莎城堡或Spring.NET-优点和缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

昨天,当我偶然发现有关这两种新的IoC工具的文章时,我正在阅读该站点上的一些文章。我应该首先学习哪个?

解决方案

Castle.Windsor或Spring.NET都不是新的。

p>


  • 温莎城堡(Castle Windsor)始于2004年底

  • Spring.NET始于2006年初 li>


它们是两个可比较的 DI容器,其本质上旨在提供相同的服务,因此您无需先学习一个,再也不需要咨询何时使用哪个规范。



我已经使用温莎城堡大约半个世纪了一年,对此我普遍感到满意。我尚未看过Spring.NET,但它看起来非常紧密地



Castle Windsor



Castle Windsor和Spring.NET并非仅适用于.NET的DI容器。这是更大的列表:




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:

这篇关于温莎城堡或Spring.NET-优点和缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆