Monday, June 18, 2012

Enhanced Project Template in MVC4

Project Template is gives us the predefined, customized and reusable components. So It accelerates the development process  instead of starting the project from scratch.

Install the ASP.NET MVC 4 from the following Location MVC4 Setup

MVC 4 Enables list of following built in Template.


  • Internet Application
  • Intranet Application
  • Mobile Application
  • Web API
  • Basic Template 
  • Empty Template



MVC 4 Built In Templates

Go to Visual studio 2010 click File -> New Project and Select ASP.NET MVC 4 and click OK. this will popup another window,

This will list out Project Template and the option for the View Engine and whether to include the unit project or not



Internet Application

This templates help us to create a web application using asp.net MVC 4

For the first demo i am going to select the Internet Application,  if you notice the bottom of the visual studio while loading the first application in MVC 4, it will load all the dependent packages through Nuget. This is one of the new functionality which is added part of the MVC 4




How do i check the list of package installed part of my application?


In Solution Explorer, select your project and open the Package.Config File, This file contains the list of the Nuget Package used in this project.

This is my package.config file






 
 


I selected the internet application and the View Engine as Razor and i didn't check in the Unit Test Project
and click OK, it creates My Project with the list of predefined files. To run the application i hit Ctrl +F5

It loads my first application

In addition to cosmetic improvements, there’s improved functionality in the new template. The template employs a technique called adaptive rendering to look good in both desktop browsers and mobile browsers without any customization.

Intranet Application


This template look similar to the internet application, It uses the windows authentication instead of the forms authentication which is used by the Internet Application


Mobile Template


This template used to develop the project specific to the mobile and tablets browsers


This template contains the same application structure as the Internet Application template (and the controller code is virtually identical), but it's styled using jQuery Mobile to look good and behave well on touch-based mobile devices. To learn more about how to structure and style mobile UI, see the jQuery Mobile project website.

No comments:

Post a Comment