Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

.NET IoC container for mid-size ASP.NET MVC

My team plan to start a new project this June. This application tend to used by 2,000 concurrent users. Now we are discussing about technical decision - what IoC container we will use in our project. All members in my team don't have experience with IoC, some of us read and know what it is though. Our requirements are:

  1. Performance - Our management state that IoC may slow down the application and they expect that IoC container we use will not degrade the performance. They also expect the IoC container to have a good performance for little or large or resolver process.
  2. Feature sets - I an my coworkers expect it to has rich feature sets. I don't know at this time what feature we gonna use but I have experience that some component can start easy but can't do something more advance.
  3. Documents or books - I plan to study the IoC we selected by reading from online documents or books.
  4. Work with ASP.NET MVC 4
like image 549
Anonymous Avatar asked Mar 25 '12 14:03

Anonymous


1 Answers

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

I'd recommend using the CommonServiceLocator [http://commonservicelocator.codeplex.com] as part of your implementation. That way it is easy to change your mind later.

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

  • Supports Autowiring and assembly scanning
  • Lifetime Scoping (Such as Singleton or HttpRequest)
  • Easy to register an implementation to multiple request types
  • Supports Named or Keyed (named by Enum) registration
  • It's fast

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

like image 160
Jeremy Bell Avatar answered Sep 30 '22 08:09

Jeremy Bell