Music Store episode 2nd: laying the foundation

Source: Internet
Author: User

Select "new" from the File menu in Visual Studio and select "project.

Then, select the web template group in C #, select ASP. Net MVC 4 Web application in the Project template on the right, enter mvcmusicstore in the project name input box, and click OK.

At this time, you will go to the second dialog box, allowing us to set some settings for the project about MVC, confirm that the "null" Project template is selected, the view engine selects razor, and click OK.

In this way, the project is successfully created!

Let's take a look at what has been created in this project.

Some basic naming conventions are used in ASP. net mvc.

 

Folder

 
 

Function

 
 

/Controllers

 
 

The Controller accepts requests from the browser for processing and then returns a response to the user.

 
 

/Views

 
 

View folder to save the User Interface Template

 
 

/Models

 
 

This folder defines the processed data

 
 

/Content

 
 

Put our images, CSS and any other static content here

 
 

/Scripts

 
 

Place script files

 
 

/App_data

 
 

Database Files

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

These folders also exist in an empty ASP. net mvc application, because the ASP. net mvc framework uses"Conventions are better than configurations"It has been assumed that these folders have a specific purpose. For example, the Controller will find the corresponding view in the Views folder, without explicitly setting it in the code, which can save a lot of programming work, it also makes it easier for other developers to understand your program. During the process of creating this program, we will detail these conventions.

Music Store episode 2nd: laying the foundation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.