ASP.NET MVC is a web application development framework launched by Microsoft as an alternative to the classic WebForms model in ASP.NET. It is based on the Model-View-Controller pattern, which lends the framework its name. ASP.NET MVC uses a very different approach, which tries to address various issues developers have had with the WebForms model. A full description of the framework is beyond the scope of this article, but for the sake of context, we’ll give several advantages and disadvantages when comparing it to WebForms. For more information about ASP.NET MVC, you can visit its official web site.
For more information, see:
Model-View-Controller is a design pattern that tries to apply the principle of “separation of concerns” to application development. Separation of concerns states that in software, each component should be responsible for only one function. For a full description of the MVC pattern, you can read the following articles:
The WebForms and MVC models have their own philosophies and a direct comparison between the two is useless. One way to think about them is that they are both frameworks for development of web applications, and they both use .NET as a platform. This is where similarities end. On a higher abstraction level, both frameworks use very different concepts. Rather than comparing them directly, here we will discuss several of their differences.
Web application development is all about some server that generates HTML and sends it to a browser over HTTP, which is a stateless protocol. A lot of web development frameworks (including ASP.NET WebForms) tried to provide an abstraction over this, to make development closer to traditional desktop development. ASP.NET MVC views it as a disadvantage and embraces HTTP.
WebForms relies on controls to be the building blocks for user interface. Because of the stateful nature of WebForms and the fact that controls don’t work without an Http Context, they are hard to test. This has been cited as a major disadvantage of the WebForms model. Controller in ASP.NET MVC are decoupled from any state and can be easily tested and mocked.
The WebForms model uses HTTP and HTML concepts to emulate state. This clatters the markup of a page with stuff that is non-trivial and sometimes not really needed. WebForms does not allow you to directly have control over this markup, while MVC does. Lots of developers who want better control would prefer MVC at this point.
Back To Top
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important
Copyright © 2023 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, Ipswitch, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.
Powered by Progress Sitefinity