Asp.Net MVC is around for quite some time and it has created some real waves among developers. Its first version was released in December 2007 and the recent stable release MVC 3 came in January 2011. MVC 3 comes up with lot many features which make development faster such as support for Dependency Injection, new templating engine called Razor Templates etc. MVC 4 moves further to provide better development environment.
What is asp.net MVC?
For those who are new to asp.net MVC, here is a small introduction: MVC is an architectural pattern which is popular for its most striking feature – separation of concerns. With MVC, business logic, user interface and the mapping between logic and interface fall in to distinct layers. One can build highly maintainable applications faster compared to asp.net Web Forms. To get a good understanding of asp.net MVC, watch this tutorial video “Building Applications with asp.net MVC“.
Features of MVC 4
Major improvements on MVC 4 fall in to supporting mobile devices or devices such as tablets in general which come with all possible screen size and resolutions.
- To check the mobile version of the page, either you can use a mobile emulator such as Opera Mobile Emulator or reduce the browser size.
- A new template for mobile/tablet specific sites “Mobile Application project ” is added to the template gallery. It is based on jQuery Mobile, building touch-optimized UI.
- If an existing site is to be modified to support mobile devices, then “Display Modes” features helps to do that. Depending the on the browser from which the request is made, corresponding display mode will be activated to provide optimal browsing experience. It also provides a View Switcher feature to easily switch between different views.
- Recipes and Code Generation in Visual Studio: Recipes framework helps to write code-generation plugins, which you can be used to replace the built-in code generators for Add Area, Add Controller, and Add View. Recipes are deployed as NuGet packages to enable easy sharing with other developers in the team.
- Task Support for Asynchronous Controllers: Now you can write asynchronous action methods as single methods to return an object of type Task orTask<ActionResult>.
- MVC 4 also supports Azure SDK