MVC 4 Application Templates

While creating a new MVC 4 application, you’ll be presented with an intermediate dialog with some MVC-specifi c options for how the project should be created, as shown in Below Figure. The options you select from this dialog can set up a lot of the infrastructure for your application, from account
management to view engines to testing.

  1. The Internet Application template: This contains the beginnings of an MVC web application — enough so that you can run the application immediately after creating it and see a few pages. You’ll do that in just a minute. This template also includes some basic account management functions which run against the ASP.NET Membership system.
  2. The Intranet Application template: The Intranet Application template was added as part of the ASP.NET MVC 3 Tools Update. It is similar to the Internet Application template, but the account management functions run against Windows accounts rather than the ASP .NET Membership system.
  3. The Basic template: This template is pretty minimal. It still has the basic folders, CSS, and MVC application infrastructure in place, but no more. Running an application created using the Empty template just gives you an error message — you need to work just to get to square one. Why include it, then? The Basic template is intended for experienced MVC developers who want to set up and configure things exactly how they want them.
  4. The Empty template: The Basic template used to be called the Empty template, but developers complained that it wasn’t quite empty enough. With MVC 4, the previous Empty template was renamed Basic, and the new Empty template is about as empty as you can get. It has the assemblies and basic folder structure in place, but that’s about it.
  5. The Mobile Application template: As described earlier in this chapter, the Mobile Application template is preconfigured with jQuery Mobile to jump-start creating a mobile only website. It includes mobile visual themes, a touch-optimized UI, and support for Ajax navigation.
  6. The Web API template: ASP.NET Web API is a framework for creating HTTP services. The Web API template is similar to the Internet Application template but is streamlined for Web API development. For instance, there is no user account management functionality, as Web API account management is often significantly different from standard MVC account management. Web API functionality is also available in the other MVC project templates, and even in non-MVC project types.
Tagged . Bookmark the permalink.

Leave a Reply