Getting Started with Visual Studio 2013 and ASP.NET MVC 5

The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The MVC framework is defined in the System.Web.Mvc namespace and is a part of the System.Web namespace. The MVC pattern helps you create applications that separate the different aspects of the application (input logic, business logic, and UI logic), while providing a loose coupling between these elements. The pattern specifies where each kind of logic should be located in the application. The UI logic belongs in the view. Input logic belongs in the controller. Business logic belongs in the model. This separation helps you manage complexity when you build an application, because it enables you to focus on one aspect of the implementation at a time.
This tutorial will look at the basics of building an ASP.NET MVC 5 Web application using Visual Studio 2013. Keep an eye out for more installments as we dive deeper into each of the key areas.
For more information on MVC read the first part of the blog post Getting Started with ASP.NET MVC 4 Mobile Development and Jquery

Getting Started

  1. Open Visual Studio 2013 and select New Project as shown in the following screenshot

  1. In the New project screen within the Templates expand Visual C#, then select Web, in the Name field enter MVC Topics and then click Ok as shown in the following screenshot

  1. In the New ASP.NET Project – MVCTopics dialog select MVC and then click OK as shown in the following screenshot.

  1. This leverages a default Visual Studio template for ASP.NET and creates a default working application as shown in the following screenshot.
  1. Press F5 to start the application and validates it renders as shown in the following screenshot.

As you can see the default template provides a Home, About, Contact and Registration capability. Also, if you resize the browser you can see that it becomes responsive as shown in the following screenshot.

Finally take a take a look at your Solution explorer and notice that Models, Views and Controllers are stored within separate folders as shown in the following screenshot.

A more detailed breakdown of the folders in your project structure is shown below.

Share this article on   LinkedIn

Thomas Robbins

I spend my time working with partners and customers extending their marketing and technology to the fullest.