开发者

Comparison between Unity and Moq Dependency Injection Frameworks

Faced with choosing a Dependency Injection Framework in a historically MS shop working with C#, I'm interested in finding out the differences between Moq and Unity.

Some of the main concerns would include:

  • Ease of use for developers with no background in DI
  • Feature comparison between the two (once everyone becomes familiar with the technology).
  • Performance (not sure if this is even an issue)
  • Integration with visual studio, particularly wi开发者_如何学Cth regards to refactor tools
  • Readability / maintainability
  • Experience when used with other tools such as MEF or EF

Has anyone had any experience in comparing these two? Does anyone have any reasons for choosing one or the other? Are there any others that I should really be considering as well?


As stated by Robert Harvey, Moq is a library for mocking (i.e. replacing a class implementation with one that always returns predictable results), not a dependency injection framework.

You might use Moq with Unity.

For alternative DI suggestions, try here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜