.NET IoC container for medium-sized ASP.NET MVC

My team plans to start a new project in June this year. This application is typically used by 2,000 concurrent users. Now we are discussing the technical solution - which IoC container we will use in our project. All members of my team have no experience with IoC, some of us read and know what it is. Our requirements:

  • Performance. Our management indicates that IoC can slow down the application, and they expect that the IoC container we use will not degrade performance. They also expect the IoC container to have good performance for a small or large or discriminating process.
  • Feature Sets - My colleagues, I expect him to have rich feature sets. At present, I don’t know what function we will use, but I have experience that some component can start easily, but cannot do something more advanced.
  • Documents or books - I plan to learn the IoC that we selected by reading from online documents or books.
  • Work with ASP.NET MVC 4
+6
source share
1 answer

I used StructureMap, Autofac and Ninject. They are all very good.

I would recommend using the CommonServiceLocator [ http://commonservicelocator.codeplex.com] as part of your implementation. That way you can change your mind later.

I personally like Autofac's best. It has a good balance of features and simplicity.

  • Autowiring scan and build support
  • Reach (e.g. Singleton or HttpRequest)
  • Easy to register implementation for multiple request types
  • Support for registering names or keys (Enum names)
  • Quickly

http://code.google.com/p/autofac/wiki/MvcIntegration http://nuget.org/packages/Autofac.CommonServiceLocator-unofficial

+7
source

Source: https://habr.com/ru/post/911603/


All Articles