Skip to main content

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
By Anil Singh | Rating of this article (*****)

Popular posts from this blog

List of Countries, Nationalities and their Code In Excel File

Download JSON file for this List - Click on JSON file    Countries List, Nationalities and Code Excel ID Country Country Code Nationality Person 1 UNITED KINGDOM GB British a Briton 2 ARGENTINA AR Argentinian an Argentinian 3 AUSTRALIA AU Australian an Australian 4 BAHAMAS BS Bahamian a Bahamian 5 BELGIUM BE Belgian a Belgian 6 BRAZIL BR Brazilian a Brazilian 7 CANADA CA Canadian a Canadian 8 CHINA CN Chinese a Chinese 9 COLOMBIA CO Colombian a Colombian 10 CUBA CU Cuban a Cuban 11 DOMINICAN REPUBLIC DO Dominican a Dominican 12 ECUADOR EC Ecuadorean an Ecuadorean 13 EL SALVA...

39 Best Object Oriented JavaScript Interview Questions and Answers

Most Popular 37 Key Questions for JavaScript Interviews. What is Object in JavaScript? What is the Prototype object in JavaScript and how it is used? What is "this"? What is its value? Explain why "self" is needed instead of "this". What is a Closure and why are they so useful to us? Explain how to write class methods vs. instance methods. Can you explain the difference between == and ===? Can you explain the difference between call and apply? Explain why Asynchronous code is important in JavaScript? Can you please tell me a story about JavaScript performance problems? Tell me your JavaScript Naming Convention? How do you define a class and its constructor? What is Hoisted in JavaScript? What is function overloadin...

25 Best Vue.js 2 Interview Questions and Answers

What Is Vue.js? The Vue.js is a progressive JavaScript framework and used to building the interactive user interfaces and also it’s focused on the view layer only (front end). The Vue.js is easy to integrate with other libraries and others existing projects. Vue.js is very popular for Single Page Applications developments. The Vue.js is lighter, smaller in size and so faster. It also supports the MVVM ( Model-View-ViewModel ) pattern. The Vue.js is supporting to multiple Components and libraries like - ü   Tables and data grids ü   Notifications ü   Loader ü   Calendar ü   Display time, date and age ü   Progress Bar ü   Tooltip ü   Overlay ü   Icons ü   Menu ü   Charts ü   Map ü   Pdf viewer ü   And so on The Vue.js was developed by “ Evan You ”, an Ex Google software engineer. The latest version is Vue.js 2. The Vue.js 2 is very similar to Angular because Evan ...

Top 50 C# OOPS Interview Questions and Answers | Freshers and Experience

List of 50 C# Object-Oriented Programming (OOP) interview questions along with brief answers. What is Object-Oriented Programming (OOP)? Answer : OOP is a programming paradigm that uses objects and classes for organizing code. It revolves around the concepts of encapsulation, inheritance, and polymorphism.   Define encapsulation? Answer : Encapsulation is the bundling of data and the methods that operate on that data into a single unit, known as a class.   What is a class in C#? Answer : A class is a blueprint or a template for creating objects. It defines the data and behavior that the objects of the class will have.   Explain inheritance in C#. Answer : Inheritance is a mechanism by which a class can inherit the properties and behaviors of another class. It promotes code reuse and establishes a relationship between the parent (base) class and the child (derived) class. How is polymorphism achieved in C#? Answer : Polymorphism is achieved through ...

Difference between Data Abstraction and Encapsulation

Data Abstraction: OOPs concepts that hide the implementation details and show only the functionality to the user that is called Abstraction. OOPs languages use the abstract class and interface to achieve the Abstraction.   Data Encapsulation: OOPs concepts that wrap the data and methods together into a single unit are called Encapsulation. Oops languages can achieve encapsulation by making the data members private and accessing them throw a public network.