Differences between ASP. net mvc and WebForm three-layer architecture

Source: Internet
Author: User

 

1.Problems in traditional WebForm Development

In traditional ASP. NET development, Microsoft's development team designed a rapid development environment for developers to drag and drop controls in the visual designer and write code to respond to events. However, the negative effects it brings are:

Since the control encapsulates many things, it is difficult for developers to understand how the HTML behind it works.

It is easy to get a page containing a large number of viewstates, so that the page size far exceeds the required content, making the page open slowly

Not easily tested

2.What is MVC??

MVC (Model-View-Controller, Model-View-Controller mode) is a software architecture mode in software engineering. It divides a software system into three basic parts: Model, View, and Controller ).

3. What isASP. NET MVC?

ASP. net mvc is an easy-to-be-tested framework developed by Microsoft's development team based on MVC. It has the following features:

No data return

View status not saved on the page

Developers have full control over the page presentation process.

Easy unit test

Easy to test-driven development

Scalable and replaceable

Supports related features in WebForm, such as user controls, master pages, data binding, and localization.

Instead of based on the file directory structure, the URL is mapped to the Controller.

4.Why ASP. NET MVC?

Easy Unit Testing

Easy to test-driven development

This prevents page files from becoming bloated due to a large number of viewstates in WebForm.

5.MVC and L3 Architecture?

MVC is a pattern
ASP. net mvc is a MVC-based development framework.
A three-tier architecture is an architecture

As for the differences, we can strictly distinguish them from each other in terms of concept.

Is the relationship between MVC and the three-tier architecture

6. How to choose between MVC and Webform?

7. coexistence of the two technologies

The ASP. net mvc framework is only a choice for developers to develop web applications, rather than replacing Webform.

The two technologies have their own advantages and disadvantages. developers need to select the corresponding technology based on the actual situation.

Sometimes these two technologies can be used together in the same project.

8. Architecture diagram of ASP. net mvc and Webform Technology

Summary:

After reading this article, I believe ASP. NET WebForm and ASP. net mvc is a good choice for everyone. I always think that many times it is not a good technology, it is suitable for problems that are not suitable or whether they can be used properly.

For example, if a horse is flushed into the ground, I am afraid it may not be able to achieve the desired effect. In the end, I may complain about what the horse is, and I have no strength at all.

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.