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