Why does ASP. NET have MVC?

Source: Internet
Author: User

I have to admit that MVC was not originally designed by Microsoft R & D personnel to ASP. NET. We have no idea why we have to forcibly add it to ASP. NET later.
However, MVC frameworks such as struts on the Java platform are in full swing, and many new and old technicians have given them a layer-by-layer sacred halo. If Microsoft does not take any action, it is true that some of the "software empire" faces are lost.

The super weapon of the software empire-webform
Webform -- it is indeed a very creative and practical thing. However, it is certain that webform will always keep its unique characteristics and have unparalleled convenience in the present and the near future.
In webform, Microsoft pioneered desktop applicationsProgramThe development mode of is introduced into the development of Web applications. For example, drag controls, add event handlers, and then run ...... All of this is so cool and amazing.
In addition, ASP. NET can also display the foreground ViewCodeIt is completely isolated from the background event handler in two different files. In this way, all seemingly magical things are automatically completed by the system.
All of this is more comfortable for a junior web program developer than writing a huge pile of Page code. Therefore, ASP. NET webform once attracted numerous developers.

super weapons also have blind spots
back to the last century, most Web applications use data programming with mixed code in pages. For example, ASP and PHP (earlier) directly send requests to the database on the page and use the program structure displayed in HTML. This method is usually relatively fast in development, but the separation of Data Pages is not very direct, so it is difficult to reflect the business model of the program, of course, it is difficult to achieve the reusability of the model. The product design is not flexible, and it is difficult to meet changing user needs.
however, these defects are all well solved by JSP and ASP. NET Object-Oriented languages. Currently, common applications use a layer-3 (or multi-layer) structure to process the business logic in the program.
at the web application interface layer, different contents are often presented to different users at different times. So can we separate the judgment on "different moments", "different users", and "different content" from the specific content, making it easier to control and coordinate becomes a new problem.
as a result, Java immediately introduced the MVC application framework, which perfectly solved this problem.
at the same time, ASP. NET is focusing on the research and application of webform, and has also made some remarkable achievements. However, it greatly integrates the relationship between V and C in the MVC model. Although it is unique, it makes the UI Layer coupling of the application strengthen, in other words, it is somewhat different from the MVC idea (maybe it is a bit derogatory, but it does not mean to belittle webform here), which has aroused complaints from many developers and testers.

 Rapid response of software empire
At the rapid development of the MVC Framework in Java and the popularity of ASP. NET webform, Microsoft launched the ASP. net mvc framework.
Maybe it is because the development of MVC in Java is too hot. Microsoft seems to be following the trend, so many people are beginning to look at ASP. net will usher in the end of webform, the new era of MVC, this is actually no basis.
First of all, MVC and webform are not comparable at all. webform is a brand new web development model and is a complete set of things from start to end. Although it has some limitations in some aspects, it is still an excellent development model and cannot be replaced by MVC.
Secondly, MVC and webform have their own strengths. MVC mainly solves the coupling problem of the view layer, but does not have the fast development and easy-to-use features. The knowledge that developers need to master is more systematic and comprehensive; webform is easy to use and easy to get started. It has an irreplaceable position of MVC.
In short, MVC and webform will not conflict, nor will there be a party that will soon die (unless one of them integrates the advantages of both to one side ).
In addition, according to Microsoft's attitude towards the two, it seems that Mr. Deng Xiaoping's words should be followed: "Both hands should be hard ".

Others

To put it one thing that may upset Java programmers: I learned ASP. net, it feels very good (although it is very "young"), it directly solves a lot of Java criticism, such as configuration files like novels ......

(Note: Some of the ideas and languages in this Article refer to a user's blog, but they are hard to remember)

(Reprinted please indicate the source: http://www.cnblogs.com/zhhh)

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.