Advantage of IControllerActivator over DefaultControllerFactory.CreateController

What additional benefit does IControllerActivator.Create (new in MVC4) make when the controller can already be created by the user (and enabled using the DI) by overriding the CreateController DefaultControllerFactory method?

+3
source share
1 answer

The controller activation logic was pulled from the factory default controller and placed in the controller activator; therefore, this was done to make it a little more flexible and to follow a single responsibility template. Depending on which version of MVC you are using, it now uses the controller activator to create the controller. They work hand in hand to do the job; so you can configure them and it will work in a similar way. I do not see that there was an advantage between them.

See Brad Wilson's blog post about this .

+3
source

All Articles