The post aim is to help you decide when it’s appropriate to use ASP.NET MVC
Framework and when it is appropriate to use ASP.NET Web Forms.
Web Forms Web Application Advantages
The old ASP.NET Web Forms framework is a mature framework that is
being used in a lot of applications and web sites. The advantages of Web
- State Management – in Web Forms state management is more easier.
The use of ViewState or server based forms simplify the state management
but reduce the control over the application behavior.
- Event driven model – the Web Forms uses an event model that helps
to develop a more event driven application. You can wire to a lot of
events that are supported by the framework through controls and your pages.
- Server Controls – the Web Forms approach has a massive control libraries
that can be used to build your application. On the other hand, the MVC
framework doesn’t currently have a lot of controls that can help to
build a more rich application and therefore you’ll have to build them
- Rapid development – it is faster to develop applications in the Web Forms
approach. The reasons for that are the support for components like server
controls or the page class that make it easier to develop (but brings a lot of
cons which are some of the advantages of MVC framework).
MVC Web Application Advantages
The ASP.NET MVC Framework is a new framework and therefore is more
risky then Web Forms approach which proved itself (or if you would like, didn’t
proved itself) in the past. The MVC framework brings the following advantages
over Web Forms approach:
- Separation of concern – the application is divided to Model, View and
Controller parts which makes it easier to manage the application complexity.
- TDD – the MVC framework brings better support to test-driven
- Extensible and pluggable – the MVC framework components were designed
to be pluggable and extensible and therefore can be replaced or customized
easier then Web Forms.
- Full control over application behavior – the MVC framework doesn’t use
ViewState or server based forms like Web Forms. This gives the application
developer more control over the behaviors of the application and also reduce
the bandwidth of requests to the server.
- ASP.NET features are supported – MVC framework is built on top of
ASP.NET and therefore can use most of the features that ASP.NET include
such as the providers architecture, authentication and authorization
scenarios, membership and roles, caching, session and more.
- URL routing mechanism – the MVC framework supports a powerful URL
routing mechanism that helps to build a more comprehensible and
searchable URLs in your application. This mechanism helps to the application
to be more addressable from the eyes of search engines and clients and can
help in search engine optimization.
Lets sum up, I wrote about the advantages of each ASP.NET approach.
When starting a new web application you will have to consider every aspect
of the application and then choose which framework is suitable for you to use.
Each framework brings its pros and cons and I hope I gave enough details
for you to make the right choice. I would like to read what are your thoughts
about which framework to use and when.
You can read the original article here.