From: http://www.cnblogs.com/wlb/archive/2009/12/07/1618954.html
1. Problems in traditional webform Development
In traditional ASP. NET development, Microsoft's development team designed a drag-and-drop control in the visualization designer for developers to writeCodeA quick development environment that responds 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 is ASP. 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 three-tier 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 only provides developers with the ability to develop Web applications.ProgramInstead of 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 and flushed, it may not be able to achieve the desired effect. In the end, it may complain that there is no such thing as a broken horse.