Thursday, 21 May 2015

ASP.Net MVC 6 New Features

Let's see what is new in ASP.NET MVC 6

Full Framework vs. Cloud-optimized Framework
In MVC 6 Microsoft removed the dependency of System.Web.Dll from MVC6 because it's so expensive that typically it consume 30k of memory per request and response, whereas now MVC 6 only requires 2k of memory per request and the response is a very small memory consumtion.

The advantage of using the cloud-optimized framework is that we can include a copy of the mono CLR with your website. For the sake of one website we do not need to upgrade the .NET version on the entire machine. A different version of the CLR for a different website running side by side.

MVC 6 is a part of ASP.NET 5 that has been designed for cloud-optimized applications. The runtime automatically picks the correct version of the library when our MVC application is deployed to the cloud.

Run on hosts other than IISWhere we use MVC5 we can host it on an IIS server and we can also run it on top of an ASP. Net Pipeline, on the other hand MVC 6 has a feature that makes it better and that feature is itself hosted on an IIS server and a self-user pipeline.


Environment based configuration systemThe configuration system provides an environment to easily deploy the application on the cloud. Our application works just like a configuration provider. It helps to retrieve the value from the various configuration sources like XML file.
MVC6 includes a new environment-based configuration system. Unlike something else it depends on just the Web.Config file in the previous version.

Dependency injectionUsing the IServiceProvider interface we can easily add our own dependency injection container. We can replace the default implementation with our own container.

Supports OWINWe have complete control over the composable pipeline in MVC 6 applications. MVC 6 supports the OWIN abstraction.