Sunday, July 19, 2015

Features of MVC 6.0


  1.  Dependency on System.Web has been removed. Advantage is less memory per request( Reduced from 30k to 2k per request).
  2. Mvc, Web Api controllers has been merged. They are derived from the same controller. Single controller can return both MVC views or formatted web api (on the same http verb).
  3. New project extension known as project.json. Contains build information as well as project dependencies.
  4. Built in support for dependency injection known as ASP.Net dependency injection.
    no need to rely on third party dependency injection
  5. Support for Grunt.js . Task runner that enables to build front end javascript and css. Ex: It can be used for concat or minify javascript.
  6. Default testing framework has been changed. From visual studio unit test framework to
      uses [Fact] attribute compared to [TestMethod]
  7. Better helpers compared to Html helpers known as Tag Helpers. This would help front end designers as the tags are like html.
           Ex for  Html helper
           @Html.LabelFor(m => model.FirstName, "First Name:")
           Ex for Tag helper

            <label asp-for="FirstName">First Name:</label>
  8.  Introduction of view Components . provides us capability to generate part of the UI similar to partial view. Limitations of partial view is that it did not have its own container. Not having controller makes it more complex for writing logic between view and controller. This limitation has been addressed by View Components .It has its own class similar to controller