ASP. NET Mvc+ef Framework +easyui for Rights management

Source: Internet
Author: User

4. Why use MVC instead of WebForm?

 (1) Why use MVC instead of WebForm? This is what I think, because I want to explain the pros and cons of WebForm and MVC, so that you can better understand the MVC and webform, and not like some people say that MVC will replace WebForm, I personally think this possibility is very small, because each has its own benefits, see where to use it , I'll briefly introduce the pros and cons of WebForm and MVC below.

(2) WebForm Introduction

1) Advantages

1): Support the event model, depending on Microsoft provides a rich server-side build, WebForm can quickly build Web applications.

2): Very convenient to use, easy to get started, but to understand the bottom still has to pay a great effort, this is us. NET programmers are known to only drag controls for the reason.

3): Microsoft provides a large part of the controls, and many companies have developed a lot of controls for our programmers to use.

2) Disadvantages

1): Encapsulation of strong, a lot of things from the bottom of the package to let us beginners are not very clear.

2): Getting Started is very easy, but it is very difficult to improve without studying the underlying, so we must have time to study the bottom.

3): Complex life cycle Model learning is not very easy, a lot of events.

4): Control is not very flexible, the control of the server control is very difficult.

5):ViewState processing, between the request and the response between the delivery, when we use WebForm developed the site, we can right-click in the browser to see the source code will see a lot of ViewState, very wasteful of resources and waste of server broadband.

6): For asynchronous requests, each request must have a generic handler or ASPX page corresponding to the background.

(3) Mvc

1) Advantages

1): MVC easily divides complex applications into m,v,c three component models, Model,view,controler effectively simplifies complex architectures and embodies a very good isolation principle.

2): Because the server-based forms (Incident response model) is not used, we can make the programmer more flexible and the page cleaner.

3): Can control the custom URL, that is, MVC in the routing mechanism, this can be said to be a highlight of MVC, no longer we in the WebForm era of the configuration of static page process. and for SEO friendly. Can make more use of web crawler.

4): Strong-type View implementation, more secure, more reliable, more efficient.

5): Let Web developers (programmers) can focus more on a particular layer of development, conducive to our division of labor with the use of large-scale architecture development.

6): MVC under the face of asynchronous processing more a good support, a control it can have a lot of action below, and each action corresponding can have a different request.

7): MVC checksum is very good, we just need to give each method into the node can be achieved cannot be null parity.

[Requred]

public string Name{get;set;}

8): When the form is submitted, it provides the function of automatic assembling.

       9): Microsoft offers a number of global filters (Identity check filters, exception filters, Action filters, view results filters, these are the new features that MVC brings, so that our development can be developed more quickly.

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.