Thursday, January 1, 2015

MVC Features Old and New

This is my second post in the series of blog posts where I am talking about MVC 5.

MVC Features

Today I am going to discuss some of the features / components of MVC briefly that help us in building our dream web application.

Forms and HTML helper

MVC lets us exploit the power of Form tag & HTML Helpers help us establish coordination between a view and the run-time.

Data Annotation and Validation

Annotations allow us to feed metadata to the framework. This metadata is then used by framework for validations as well as in building the HTML to display and edit models.

Membership, Authorization and Security

MVC has bunch of features for authentication, authorization, enabling external logins and preventing attacks like SQL injection, cross-site scripting, cross-site request forgery, over posting, open redirection, etc.


Ajax techniques help you build responsive web applications which are necessary for good user experience. Using unobtrusive JavaScript. JQuery, JQuery UI etc make the client side programming easier and more powerful.


This helps you map logical URLs to controller action methods. Routing in itself can be considered as fourth component of MVC other than model, view and controller.


This is a package management system for .NET and Visual Studio. It makes it easy to add, update and remove external libraries and their dependencies in our application.


This allows the application to accept and generate structured data in form of XML, JSON, etc and allows us to dispatch actions based on HTTP verbs rather than actions.

Dependency Injection

Dependency Resolver in MVC allows the application to use dependency injection for services as well as controllers and view pages.

Unit Testing

Unit Testing capability is well integrated with the MVC application and guides us how to write unit tests for the application.

    Newly Added Features to MVC 5

    Furthermore, some of the new awesome features that are added to MVC 5 are:

    One ASP.NET

     In MVC5, when you create a project, only one ASP.NET project type exists. You can simply create a web application and later decide what type you want it to become, e.g. Web forms, MVC, etc.

    New Web Project Experience

    The dialogs for creating a new application have been simplified a lot in Visual Studio 2013.

    ASP.NET Identity

    The new ASP.NET identity system spans across the whole ASP.NET family whether its MVC, Web Forms or SignalR, etc.

    Bootstrap Templates

    In MVC5, the project templates use the well-known Bootstrap framework which gives the project a nice look and feel. You can easily customize the look and feel using any of the bootstrap themes or creating your own.

    Attribute Routing

    This is my favorite feature addition in MVC 5. This allows us to add routes to our controllers or action methods using data annotation. In my opinion, this gives clarity to the code and the routing in general.

    ASP.NET Scaffolding

    The new scaffolding system works across any ASP.NET application. You can also build your own scaffolder or edit the existing one if needed.

    Authentication filters

    In MVC5, we can have authentication filters at the controller and action level. This way we can secure only specific actions, if needed and we don't need to apply security at the whole application level.

    Filter Overrides

    This feature allows us to override a specific global filter for any particular action or controller.

    Reference: "Professional ASP.NET MVC 5"

    No comments:

    Post a Comment