2010:ASP.NET MVC IoC/DI - Structuremap 与 Ninject 等

发布于 2024-10-07 12:29:29 字数 389 浏览 0 评论 0原文

这个问题已于 2008 年回答。现在是 2010 年底。有什么变化吗?对于将永久维护的非常大的项目,建议使用以下哪些 IOC/DI 框架?

该项目的功能包括:

  1. WCF Web 服务。
  2. OData 暴露器。
  3. 各种移动设备的特殊视图。
  4. POCO 的存储库模式。
  5. 实体框架。

项目结构:

  1. 项目域(数据库、存储库)
  2. 项目服务(逻辑)
  3. 项目Web(视图、控制器、服务端点等)

This question have been answered in 2008. End of 2010 now. Any changes? which of these IOC/DI frameworks are recommended for a very large project that will be maintained forever?

Features of this project includes:

  1. WCF Web Services.
  2. OData exposer.
  3. Special Views for various mobile devices.
  4. Repository pattern with POCO.
  5. Entity Framework.

Project Structure:

  1. Project Domain (Database, Repository)
  2. Project Services (Logic)
  3. Project Web (Views, Controllers, Service Endpoints, etc)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

乄_柒ぐ汐 2024-10-14 12:29:29

我个人的偏好仍然是Ninject。优秀的文档,易于使用,非常简单,并且可以完成工作。这是我们在所有工作项目中选择的 IoC,并且效果很好。

旁注 RE 是一些将永远持续下去的东西。将您的 IoC 包裹在一个外观中,以便您可以在以后将其交换(我们使用 IoC、ORM 等来执行此操作,以防几年后我们必须更改)。

My personal preference is still Ninject. Excellent documentation, easy to use, drop dead simple, and gets the job done. It's our IoC of choice in all of our projects at work, and works a treat.

Side note RE something that will last forever. Wrap your IoC up in a facade so that you can swap it out down the road (we do this with our IoC, ORM, etc. just in case we have to change a few years from now).

べ繥欢鉨o。 2024-10-14 12:29:29

我个人使用 Spring.NET。除了可用于 DI 的简单对象容器之外,该框架还有许多其他功能。

Personally I use Spring.NET. This framework has much other features than a simple object container that can be used for DI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文