For a simple application that use asp.net mvc 3 and .net-4, what service locator application is preferred, with performance concern in mind?
Asked
Active
Viewed 485 times
3 Answers
3
See these questions:
- IOC container working with asp.net mvc 2.0
- Good IOC Frameworks to use with asp.net mvc?
- ASP.NET MVC + fluent nNibernate, what IoC tool?
About performance, none of the main IoC containers have performance issues in a web application.

Community
- 1
- 1

Mauricio Scheffer
- 98,863
- 23
- 192
- 275
-
I read already those questions, and other posts. But as you can see, all of those comparison are at least year old, and none of them take .net 4 into account. – stacker Aug 02 '10 at 20:19
-
1@stacker: nothing relevant has changed. Any of those IoC containers can be used as a mvc3/.net4 service locator. – Mauricio Scheffer Aug 02 '10 at 20:40
1
I would take a look at MEF as it's included on .NET 4.0 and there are several implementations of modularity on MVC using it.

Anero
- 1,406
- 11
- 11
-
Even for a simple application, that don't use plugins, just IoC? What about performance in comparison to a simpler IoC container? – stacker Aug 02 '10 at 01:48
1
You don't need ServiceLocator for a simple application. It just works out of the box. Like in previous versions of ASP.NET MVC.

Aleš Roubíček
- 5,198
- 27
- 29
-
1And how is this simpler than using an IoC and not suffering the inconveniences of using the ServiceLocator? – Hadi Hariri Aug 05 '10 at 14:39
-
I don't understand your question. In simple application you don't need IoC too. You need rewrite your ControllerFactory to use IoC and it is not simpler. – Aleš Roubíček Aug 11 '10 at 04:33