Thursday 10 December 2015

New Features available in ASP.NET MVC 6

In this post we are going to see the some new features available in the ASP.NET MVC 6, in the past few years asp.net under goes many changes which makes the ASP.Net surveillance in the Technology field

Single Controller DLL
In previous versions we can find that for Web project controllers are derived from System.Web.MVC.Controller and Api Controllers are derived from System.Web.Http.ApiController base class, Now both the class are combined and derived from a common library class Microsoft.AspNet.Mvc.Controller.

No more Web Forms
There is no more Web Forms in the future releases, Microsoft concentrate on the MVC standard and the Libraries which can collaborate with the open source. So no more Web Forms

In build Dependency Injection Framework 
From this version we didn't bother about the Dependency injection framework, because we got a in build dependency injection framework in asp.net mvc 6

No more VB.Net.
There is no more VB.Net in the Future release, still they are some developers who works in VB.NET this is the Time they have to change to C#, because out of 1000 only 1 developer is using the Vb.NET

No more Html Helpers
There is no Html Helpers hereafter, instead of this we have to use the tag helpers and Attributes.

For example: @Html.TextBoxFor  is stopped instead of this we have to use the Tags like <input type="text" name="df" />

asp-controller, asp-action are the sample attributes we can use , when seeing this attributes you may think it is look like the angular js, but it is the fact when any technology is trend towards the developers it is adopted by Microsoft , so now Microsoft adopted that standard

View Components
Additionally in MVC 6 we have new concepts called View components, it is almost like partial view rendering or like the custom controls, in terms of  angular js it is a directives, in MVC there created a separation called Components, which can acts as custom controls. which is derived from ViewComponent class.

Open source libraries support:
Now MVC 6 supports large open source libraries supports which are taken as in build libraries and related configuration are added in templates for ex : angular js, Bower, Grunt, NPM



From this post you can see some of the new features available in the ASP.Net MVC 6.