我应该使用 Unity(它还活着吗)?
我两年前就使用过 Unity,并且计划再次使用它。
但是,当你用谷歌搜索它时,你会看到微软网站,上面说这些页面不再维护,另一个热门网站是 codeplex.com。
然而,在 Codeplex,自 2010 年初以来就没有发布过电影,他们承诺在 5 月/6 月上映电影(我猜他们指的是 2010 年),但目前还没有上映。
所以我想知道这个产品是否还活着,或者 MEF 是新的摇滚小子吗?
ps(有点题外话)
不知道我是否是唯一的一个,但我似乎从来没有很好地了解 Codeplex 的成熟度/状态/“明年它们是否会存在”等项目,文档大部分时间马马虎虎
I've worked with Unity 2 years ago, and i was planning on using it again.
But, when you google for it, you get to the microsoft site which says that the pages are no longer maintained, and another big hit is at codeplex.com.
At codeplex however, there hasn't been a release since begin 2010, and they promise movies in may/june (I assume they mean 2010) but they aren't there yet.
So I was wondering wether the product was still alive, or is MEF the new kid-that-rocks?
ps (bit offtopic)
don't know if i'm the only one but i never seem to get a good overview of the maturity / status / 'will they exist next year' etc. of a codeplex project, and the documentation most of the time is so-so
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
几点:
MEF 的目标不是成为 Unity 的竞争产品(因此在选择它用于 IoC 的主要目的时请记住这一点)。 Microsoft 员工 Glenn Block 在此处提出了这个问题堆栈溢出:
<块引用>
我们的目标不是让 MEF 成为
通用 IoC。最好的思考方式
关于 MEF 的 IoC 方面是
实施细节。我们使用 IoC 作为
模式,因为这是一个很好的方式
解决我们正在寻找的问题
解决...MEF注重可扩展性。
P&P 论坛上也有一个类似的问题(上个月) Unity 答案如下:
<块引用>
Unity 依然存在且运行良好,而且有一个
团队正在努力解决这个问题(我们正在
构建 Unity 拦截支持
作为 Silverlight 的一部分
Silverlight 集成包)。查看
出最新的下降,你会看到
那里有更新。
此外,还有很多项目使用
今天的 Unity,包括 Microsoft
产品。 Unity 采用的脉搏
非常健康 - 超过 10 万次下载
Unity 2.0 独立版以及更多
通过 EntLib。订户数量
stackoverflow 上的 Unity 论坛是
与 MEF 论坛相同。
我强烈建议您将选择的 IoC 容器抽象到一个薄包装纸后面,以帮助您免受任何给定容器过时的风险。如果需要的话,可以更轻松地切换到不同的容器。 Brownfield Application Development in .NET 的第 251 页也提倡这种方法,并且示例代码如下(为避免侵犯版权我稍作修改):
<块引用>
A few points:
MEF, isn't aiming to be a competing product with Unity (so keep that in mind when choosing it for the primary purpose of IoC). A Microsoft employee, Glenn Block, brought this up here on stackoverflow:
There is also a similar question (from last month) on the P&P forum for Unity with the following answer:
I would highly suggest that you abstract away your IoC container of choice behind a thin wrapper to help immunize yourself from the risk of any given container becoming obsolete. It will make it easier to switch to a different container if the need arises. Page 251 of Brownfield Application Development in .NET advocates this approach too, and sample code is as follows (I changed it a bit to avoid copyright infringement):
MEF(托管扩展性框架)和 Unity 目前在 Microsoft 的依赖注入产品方面处于竞争地位。至于拦截和 AOP(面向方面编程),MEF 还没有真正努力解决这个问题。
历史告诉我们,微软并没有真正很好地管理其竞争/重叠的团队项目,其结果是半成品实施的跟踪记录,通常缺乏基本功能(看看 LINQ to SQL 和实体框架作为一个明显的例子 - 3 年后,EF 仍然缺乏 LINQ to SQL 开箱即用的非常基本的功能)。
我个人会选择更成熟、维护得更好的 DI 框架(大多数框架的功能也比 MEF 和 Unity 的总和还要多)。我喜欢温莎城堡。 NInject、StructureMap 和其他工具似乎也有良好的记录。
MEF (Managed Extensibility Framework) and Unity currently sit on competing ground when it comes to dependency injection offerings from Microsoft. As far as interception and AOP (aspect oriented programming), MEF hasn't really made an effort to tackle that just yet.
History tells us that Microsoft doesn't really manage its competing/overlapping team projects well and the result is a track record of half baked implementations that often lack basic functionality (look at LINQ to SQL and Entity Framework for an obvious example - 3 years later, EF still lacks very basic functionality that LINQ to SQL had out of the box).
I would personally go with a more mature, better maintained DI framework (most have which also have more functionality than MEF and Unity combined). I like Castle Windsor. NInject, StructureMap, and others also seem to have good track records.
我认为 MEF 是新的摇滚小子。而且非常甜蜜。它似乎有很好的记录,并且看起来它会存在一段时间。据我所知,它也比 Unity 更容易。
I think MEF is the new kid-that-rocks. And it's pretty sweet. It seems to be pretty well documented and it looks like it'll be around for a while. It's easier than Unity too, from what I've seen.
是的,Unity 仍然存在! mef 也是如此。如果我没记错的话,微软的模式和实践与 Unity 2.0 相同吗?
Yes, Unity does still exists ! and so does mef. If i am not mistaken, microsoft patterns and practises is same as unity 2.0 ?