This article will take you through the ASP.NET MVC 4 description and design templates in details, such as what templates are available in ASP.NET MVC 4 and how effectively you can use them depending on your use. This article also includes the functions of templates and the basics of how they work.

In spite of all this content this article also includes the functionality of the Razor View Engine and MVC application structure.

ASP.NET MVC 4 Dialog

This dialog box occurs when you create a new ASP.NET MVC 4 application. For these details please visit my article:

Creating a Sample App in ASP.Net MVC

MVC specifies options for how the project should be created.

Application Templates

There are several templates available in ASP.NET MVC 4 development work. These templates are as follows:

Razor View Engine (RVE)

The Razor View Engine is one of the most popular and useful features that was in MVC 3. Further it is improved with more advanced functionality in MVC 4.

The razor engine has been the first major update to rendering HTML since ASP.NET 1 shipped almost a decade ago. It was something new that developers were looking for, none at that time was familiar with that fact that this "Razor Engine, which is neither a new language nor a puppet or a framework" will be a trump card of MVC in developing network based applications.

The default view engine used in MVC 1 and MVC 2 for rendering functionality was commonly called Web Forms View Engine, because it applies the same ASPX/ASCX/MASTER files and syntax generally used in web courses.

It was planned to support editing controls in a graphical editor or any editor that can be utilized for delivering functionality.

Structure View | RVE

The structural position of a Razor engine is something like:

Structure View

(For a more elaborate survey of the Razor View Engine, please proceed through this article link: Razor View Engine in MVC)

MVC Application Structure

When you create a new MVC application with Visual Studio, it automatically adds several files and directories to the project. These directories are:

MVC Application Structure

  1. /Controllers

    The directory where you placed your controller classes that handle the URL requests. When we expand the controller directory, it shows two sub-controller directories:

    • HomeController
    • AccountController
  2. /Models

    The directory where you placed your classes that represent and manipulate data and business objects. It contains three sub-directories:

    • Account
    • Home
    • Shared
  3. /View

    The directory where you placed your UI template files that are responsible for rendering output, such as HTML.
  4. /Scripts

    The directory where you placed your JavaScript library files and scripts.
  5. /Images

    The directory where you placed your images being used in the site.
  6. /Content

    The directory where you placed your CSS and other site content, other than scripts and images used.
  7. /Filters

    The directory where you placed your filter code. Filter is the advanced feature of MVC. It comes into light along with MVC 4.
  8. /App_Data

    The directory where you placed your data files, on which you need to do Read/Write operations.
  9. /App_Start

The directory where you placed your configuration code for features like: