Different Types of Project Templates in Asp.Net MVC

  Total Views : 7053
  Comments : 1
 
  Keywords : Types of templates in asp.net mvc, Empty template in mvc, Basic template in mvc, Internet, Intranet and Mobile application template in asp.net mvc, Web api template in mvc

Templates in Asp.Net MVC

While creating new project in MVC by selecting "ASP.NET MVC 4 Web Applicaiton" we will get different project templates to select those are Empty template, Basic Template, Internet Application template, Intranet Application template, Mobile Application template and Web API templates. We will learn what are these templates in asp.net mvc and which template we need to select to create new project in asp.net mvc? by creating simple asp.net mvc web application.

 

For creating new application open visual studio (Here we are using visual studio 2012) and From Start page select File à New à  Project like as shown following image

 

create new web application in asp.net mvc

 

After that a new dialog will pop up from that select Templates à Visual C# à Web. In project select ASP.NET MVC 4 Web Application and enter Name of Project “Tutorial 2” after this just click on OK button like as shown following image

 

select asp.net mvc 4 web application and click ok to create new mvc application

 

After that a New ASP.NET MVC 4 Project dialog will appear in that Asp .net provides various types of Project Templates each has various uses

 

project template in asp.net mvc 4 project

 

Now we will learn each template in detailed manner 

Empty Template in MVC

The Empty template contains basic empty MVC folder structure with Global.asax file and App_Start folder at top and it will not contain Script folder and Content folder. This is just empty configuration from here you all need to create application. In case if we select Empty Template for project our folder structure like as shown below

 

Empty application folder structure in asp.net mvc project template

Basic Template in MVC

The basic template comes with MVC folder structure which is Model Folder, Controller Folder and View folder are empty but View folder has a Shared Folder in which it contains Layouts.cshtml and Error.cshtml. The basic template will contain Script folder with default script files and Content folder will have themes and site.css style sheet inside it. In case if we select basic template for project our folder structure like as shown below

 

Basic application folder structure in asp.net mvc 4 application

Internet Application Template in MVC

The Internet Application Template comes with MVC folder structure which contains default HomeController and AccountController with default View for both controller and AccountModels which is required for registration. It also come with Basic Login and registration Mechanism built in it. It is completely ready application for development. In case if we select internet application template for project our folder structure like as shown below 

 

Internet Application Template folder structure in asp.net mvc 4 application or project

Intranet Application Template in MVC

The Intranet Application Template is little bit similar to Internet application Template. It has default Home controller with related View in it. It also comes with built in windows based authentication mechanism. By using this Template you can develop application for intranet based systems. If we select intranet application folder template for project our folder structure like as shown below 

 

Intranet application template in asp.net mvc 4 application

Mobile Application Template in MVC

The Mobile Application Template is too similar to Internet application template which comes with default Home and Account controller with default View for both controller. Mobile application templates also come with login and registration mechanism. DotNetOpenAuth references for external log in functionality is removed in it. If we select mobile application template for project our folder structure like as shown following image

 

Mobile Application Template in asp.net mvc 4 application or project

Web API Application Template in MVC

The Web API Application is yet another version of Internet application template which comes with default Home and Value controller with default View for Home controller and Value controller inherits from ApiController .It is used for creating HTTP based RESTful web services. Web API Template is mostly use for passing data to various clients (Mobile and tablet). If you want to create quickly web based Service then Web API is best choice for it. If we select Web API application template for project our folder structure like as shown below

 

Web API Application folder structure in asp.net mvc 4 project structure

 

In our application we will select respective templates based on our requirement. 

 Comments (1)

  • shiv tutlane registered profile image
     
    shiv   Reply

    HI good technical resource for beginner and Advance. Thanks

     Feb 11, 2016

Leave a comment

  • Default Tutlane User