First recognized ASP. NET mvc2.0 [continued]

Source: Internet
Author: User

I have previously written the ASP. net mvc concept. I have not actually systematically introduced the differences between ASP. NET MVC development methods and webfrom development methods. Last night, I saw most of the search keywords accessing my blog directed at MVC, And I was impulsive to write my own superficial knowledge here for beginners to have a simple understanding. You are welcome to give a brick-making guide.ArticlePerfect for writing.

An event development model of webfrom

The browser sends a URL request. If the URL rewriting mechanism or static technology is not used, the URL request is a specific XX. ASPX page. IIS sends the URL request to. Net freamwork for processing. After complicated ASP. NET lifecycle, the XX. aspx. CS file is executed.CodeWrite some code that calls the business logic layer to process data, then, return the processing result to a new view viewpage and hand it to the view engine to replace the aspx template with a specific HTML Tag and assemble it into HTML and then write it back to the client. As shown in the following figure:

In webfrom, we can implement the event development model with viewstate help, But aspx and asxp. the codebehind technology between CS does not completely separate the code from the view. Our background code still controls the specific display logic of the view, and there is still a strong coupling.

ASP. net mvc development model

In ASP. net mvc, the "request-processing-response" model becomes simpler and easier to separate. There is no strong coupling between the view and controller, and there is no complex lifecycle of the page. It is a simple request processing and response model for our developers, which is very refreshing.

User request → IIS →. net freamwork → route 【.. Net freamwork 4.0 provides the URL routing component → controller [Controller: processes user requests and obtains data from the model, and hand over the data to view → view engine [assemble the data into the view and generate a new HTML] → Client

Shows the development model of ASP. net mvc:

Take a look at the project of a common ASP. net mvc project:

 

I hope this simple development model introduction will help you learn ASP. NET MVC. You are also welcome to give me some comments or make some mistakes.

First recognized ASP. NET mvc2.0 first recognized ASP. NET mvc2.0 [continued]

ASP. NET mvc2.0 URL routing entry-instance

ASP. NET mvc2.0 URL routing entry

Introduction to ASP. NET mvc3 (I) Environment preparations

ASP. NET mvc3 introduction to the ASP. NET mvc3 Project (II)

ASP. NET mvc3 simple getting started Season 1 (3) Introduction to filter in Controller

Asp. net mvc3 simple start season (4) detailed request processing pipeline

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.