MVC Series Learning (iv)-Initial knowledge ASP.NETMVC framework

Source: Internet
Author: User
Tags new set

Note: This article stole two pictures from Bole, and some words:

1.MVC design Patterns and ASP. NET MVC Framework

A.MVC design mode

The MVC design pattern is a software design pattern that separates the business logic from the interface display and in some way flexibly changes the way the code is designed.

The advantage of this is that it reduces the coupling of page rendering and background business.

B.asp.net MVC Framework

It is a new set of web mechanisms developed by Microsoft based on the MVC design pattern.

The traditional MVC design pattern, through configuration files, determines the controller's access to the model and view.

Microsoft has adopted a concept of "Convention over Configuration":

1. The controller is placed in the Controllers folder, and is named by the controller end

2. Each controller corresponds to a folder in the view, the folder name is the same as the controller name

3. The action method in the controller corresponds to a view

4. Controller must be non-static class, and implement IController interface

5.Controller types can be placed in other projects

2.asp.net WebForm Development mode and ASP. NET MVC Development Method

A.asp.net WebForm Development Model

When we request index.aspx, the server finds the Index.aspx file,

Then the foreground page finds the inherited class Index.aspx.cs in its background file,

Then the business logic processing, modify the foreground data, and in the PR method, render the foreground display page.

b.asp.net MVC Development Approach

When we request/blog/index, we find a controller with the same name as the blog in the server.

The controller then gives the business process to the model to process, and the processed data is returned to the controller,

Then there is the controller to decide which view to display the interface (this request is the action of index)

MVC Series Learning (iv)-Initial knowledge ASP.NETMVC framework

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.