(Asp.net MVC learning) Understanding of ASP. net mvc Framework

Source: Internet
Author: User

With this strength, I am posting my understanding of ASP. net mvc today. If you have read it, I hope you can help me identify the problem. Thank you.

Let's start with my understanding of MVC today.

MVC is an early design model. M is an exponential data model, V is a user interface, and C is a controller. The purpose of using MVC is to truly separate the model from the interface code. The MVC and L3 structures are also completely different. Layer 3 refers to the data layer, business layer, and presentation layer, which mainly separates the business and presentation.

A detailed explanation between Controller, View, and Model should be as follows.

The Controller accepts and Processes requests and sends the processed Model to a View for display.

View is mainly used to display the components of the Model in that way.

Of course, Model is the component used to store data.

In addition, there are two types of separation between them.

The first is the separation of View and Model, which can be used to develop different views for the same Model for presentation. You can also display multiple models to the same View.

The second is the separation between View and Controller, which is the so-called separation of business logic and display.

I am currently using the ASP. NET MVC 2 RC version recently released by Microsoft,

Http://www.microsoft.com/downloads/details.aspx? FamilyID = 3B537C55-0948-4E6A-BF8C-AA1A78878DA0 & displaylang = en

Use ASP. net mvc, and ASP is not used. by dragging controls like net web form, you can implement many page functions. Instead, it writes code like ASP to display data and page layout. It should be noted that the Code here is only how the Model is displayed. The Controller transmits data to the VIEW ). The code I mentioned is only html layout and some data that needs to be displayed. It is not a logic code. Here, I will deepen my understanding of the effects ^-^, and better understand the MVC design pattern.

In fact, ASP. net mvc and ASP. net webform have their own advantages and disadvantages.

Let's talk about the advantages of WEBFORM.

First, it is convenient to use, easy to get started, and high development efficiency.

Second, all the complex display logic is encapsulated into controls, and you only need to drag it to OK.

The disadvantage of WEBFORM is that the control encapsulation is too strong, it is not easy to test, and the front-end and back-end are not enough. It is very difficult to learn well.

In fact, I think the advantage of MVC is the support for unit testing, and the other is to completely separate the business logic and representation. But MVC is not designed to replace WEBFORM. If you develop small projects that do not have high performance requirements. I think using WEBFORM will save a lot of time in the development cycle. This is only the opinion of this person.

Related Article

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.