哪个依赖注入框架更好? [英] Which Dependency injection framework is better?

查看:94
本文介绍了哪个依赖注入框架更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我需要知道哪种依赖项注入框架更适合与asp.net MVC 4一起使用?我经历了不同的比较,似乎统一和结构图在性能方面较慢,配置也很复杂.我的考虑是配置灵活性和性能.人们正在了解Ninject,但并没有真正分享使用它的经验.是否有人对Ninject有生产经验?

谢谢

Hi All,
I need to know Which dependency injection framework is better to work with asp.net MVC 4? I go through different comparison and seems like unity and structure-map is slower in terms of performance also configuration is complex. My consideration is configuration flexibility and performance. People are taking about Ninject but not really sharing the experience of using it.Does anyone have production experience with Ninject?

Thanks

推荐答案

我将Ninject用于我的个人项目,并且发现它很好,因为它有很多文档.很多人都在使用它,因此就ninject的使用而言,查找信息以及最佳实践更加容易.例如,我的网站使用ninject进行依赖项注入,而我将来的个人项目中很少有广泛使用ninject的.我还计划改进我的网站,因为那时我才刚刚开始学习有关ninject的更多知识.关于ninject,我仍然学到很多东西.我没有使用任何其他DI框架,因此无法真正比​​较它们,但是到目前为止,我对ninject感到满意并感到满意.关于我的只是我的2美分.抱歉,如果没有帮助.

作为旁注,请参阅此SO帖子- http://stackoverflow.com/questions/4538625 /dependency-injection-frameworks-for-net [ ^ ]
I use Ninject for my personal projects and I find it to be good, as it has a lot of documentation. Lot of people are using it and so it''s easier to find information and also best practices with respect to the usage of ninject. For instance, my website uses ninject for dependency injection and few of my future personal projects use ninject extensively. I am also planning on improvising my site as I have learned much more about ninject as at that time I was just getting started with it. I am still learning a lot with respect to ninject. I do not use any other DI frameworks and so can''t really compare them, but, so far I am convinced and happy with ninject. Just my 2 cents regarding ninject. Sorry if it was not helpful.

As a side-note refer to this SO post - http://stackoverflow.com/questions/4538625/dependency-injection-frameworks-for-net[^]


这篇关于哪个依赖注入框架更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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