ASP.NET MVC 4.0 Features

What's New In MVC 4? - Key Features of MVC 4

The MVC is a framework, standard pattern for developing Web applications and MVC framework handled by three objects Model, View and Controller.

Previously, MVC 3 contains only three templates i.e.
1.      Empty Template
2.      Intranet Application Template
3.      Intranet Application Template

Now, MVC 4 contains as following
1.      MVC 4 introduced a popular new feature that is called Web API framework and its work over the HTTP services.
2.      MVC 4 added and improves to default project templates.
3.      MVC 4 introduced to empty project template.
4.      MVC 4 introduced to new mobile project template.
5.      MVC 4 is going to support and adding controller to other project folders.
6.      MVC 4 is going to support the Asynchronous Controllers.
7.      MVC 4 introduced to bundling and Magnification concepts.
8.      MVC 4 introduced to OAuth and OpenID login with the help of DotNetOpenAuth library.
9.      MVC 4 going to support to Windows Azure SDK 1.6.
Some Advance Features -

Full Support for Routes in MVC 4 –
routes.MapHttpRoute(
  name: "DefaultApi",
  routeTemplate: "api/{controller}/{id}",
  defaults: new { id = RouteParameter.Optional }
);

Razor Enhancements - URL Resolution - Support for ~/ syntax
You can now write this -
<script src="~/Scripts/site.js"></script>

Instead of writing this-
<script src="@Url.Content("~/Scripts/site.js")"></script>


Conditional attribute rendering –
<div @{if (myClass != null) { <text>class="@myClass"</text> } }>Content</div>




References -More useful links for MVC 4
http://www.asp.net/mvc/mvc4
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..
My Blogs - https://code-sample.com and https://code-sample.xyz
My Book1 - BEST SELLING ANGULAR BOOK (INCLUDING ALL VERSIONS 2, 4, 5, 6, 7)
My Book2 - ANGULAR 2 INTERVIEW QUESTIONS BOOK - Both Books are Available on WorldWide.

www.code-sample.com/. Powered by Blogger.