好的IOC框架与asp.net mvc的使用? [英] Good IOC Frameworks to use with asp.net mvc?

查看:112
本文介绍了好的IOC框架与asp.net mvc的使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道有什么好简单的IoC框架在那里为asp.net mvc的?具有良好的文档和只是简单的起身去。

I am wondering what good simple IoC frameworks are there for asp.net mvc? that have good documentation and are just easy to get up and going.

感谢

推荐答案

我用 Autofac ,并已非常高兴。

配置主要是做在code等你拿编译时检查你的映射为XML格式而不是编程和最好的希望。它也支持XML重写,但这样,如果你确实需要留下点什么在运行中配置/部署时间是可能的。

Configuration is mostly done in code so you get compile time checking for your mappings as opposed to programming in XML and hoping for the best. It also supports XML overrides though so if you absolutely need to leave something to be configured at run/deploy time it's possible.

借助的Contrib (不知道该怎么称呼呢?)部分提供集成了NHibernate的,起订量等对MEF团队项目的创建者在微软工作了一年,以便有一些的 MEF整合为好。

The Contrib (not sure what to call it?) portion provides integrations for NHibernate, Moq, etc. The creator of the project worked at Microsoft for a year on the MEF team so there's some MEF integration as well.

该网站的文档部分是$​​ P $ ptty的不错(不过,如果你没有找到你所需要的存在,它可能不存在......还)。在向上侧作者是SO 因此,如果您有任何疑问和适当的,你也许可以得到高质量的答案标记

The documentation section of the site is pretty good (though if you don't find what you need there, it probably doesn't exist...yet). On the up side the author is on SO so if you have questions and tag the appropriately you could probably get quality answers.

您可能也有兴趣在组织你的应用程序的配置/接线这两个博客文章是清洁的。

You might also be interested in these two blog posts on organizing the configuration/wiring of your application to be cleaner.

  1. <一个href="http://consultingblogs.emc.com/howardvanrooijen/archive/2009/11/12/using-mef-and-castle-windsor-to-improve-decoupling-in-your-architecture.aspx"相对=nofollow>使用MEF和温莎城堡,提高去耦在你的架构
  2. NHibernate和WPF:该GuyWire - 虽然这是写在WPF的情况下,同样的概念也适用于web应用程序
  1. Using MEF and Castle Windsor to improve decoupling in your architecture
  2. NHibernate and WPF: The GuyWire - Although it's written in the context of WPF, the same concept would apply to a webapp.

这篇关于好的IOC框架与asp.net mvc的使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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