DCSIMG
Deciding When to Use ASP.NET MVC Framework - Gil Fink's Blog

Gil Fink's Blog

Fink about IT

News

Microsoft MVP

My Facebook Profile My Twitter Profile My Linkedin Profile

Locations of visitors to this page

Creative Commons License

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2013 Gil Fink

Hebrew Articles

Index Pages

My OSS Projects

English Articles

Deciding When to Use ASP.NET MVC Framework

Deciding When to Use ASP.NET MVC Framework

The post aim is to  Deciding when to Use ASP.NET MVC Framework
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
Forms are:

  • 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
    yourself.
  • 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
    development.
  • 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 supportedMVC 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.

Summary

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.

DotNetKicks Image

Comments

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# January 16, 2009 2:10 PM

ASP.NET MVC Archived Blog Posts, Page 1 said:

Pingback from  ASP.NET MVC Archived Blog Posts, Page 1

# January 16, 2009 5:19 PM

Deciding When to Use ASP.NET MVC Framework - Gil Fink on .Net | cheapdirtdomain.com said:

Pingback from  Deciding When to Use ASP.NET MVC Framework - Gil Fink on .Net | cheapdirtdomain.com

# January 16, 2009 5:39 PM

Deciding When to Use ASP.NET MVC Framework - Gil Fink on .Net said:

Pingback from  Deciding When to Use ASP.NET MVC Framework - Gil Fink on .Net

# January 16, 2009 8:46 PM

UdiMilo said:

You can use the routing mechanism with asp.net webforms as well.

the mvc team created a new namespace that enables you to work with a 3.5 sp1 webforms site and take advantage of all the routing capabilities you want,

if im not mistaken, its system.web.routing

# January 18, 2009 9:36 AM

Gil Fink said:

@UdiMilo,

You are right. There is a new namespace that is called System.Web.Routing which enables routing in ASP.NET MVC framework and also in Web Forms. That namespace was added to the .NET framework through ASP.NET MVC framework. You can read about the use of routing in Web Forms in Phil Haack's blog:

haacked.com/.../using-routing-with-webforms.aspx

# January 18, 2009 1:00 PM

Gergely Orosz said:

Why are you stressing ASP.NET features for MVC? Aren't they supported the same way in Web Forms as well...? I think this is not an extra advantage to MVC.

# January 26, 2009 6:15 PM

Scott Galloway said:

Hi, correct, we are also adding full native support for WebForms routing in ASP.NET 4.0. I've just blogged about this.

www.mostlylucid.net/.../asp.net-4.0-webform-routing-quick-rsquon-dirty-version.aspx

# January 26, 2009 6:26 PM

Barry Dahlberg said:

You can see my thoughts on the matter here, I was more interested in the business reasons behind the choice though:

www.genericerror.com/.../FromASPNetWebformsToMVC.aspx

# January 27, 2009 2:47 AM

Gil Fink said:

@Barry,

Thanks for the link. I read your post and I can say it can compliment mine.

# January 27, 2009 7:55 AM

Gil Fink said:

@Gergely,

I'm not stressing ASP.NET features for MVC. As indicatedin the post MVC Framework is built on top of ASP.NET. Being able to use ASP.NET built in features is a plus for both ASP.NET Web Forms and the MVC Framework. It's a plus for MVC Framework because you won't be needed to implement these features by yourself.

# January 27, 2009 7:59 AM

ASP.NET said:

Deciding When to Use ASP.NET MVC Framework - Gil Fink on .Net

# January 28, 2009 5:33 AM

www.babblr.de said:

Deciding When to Use ASP.NET MVC Framework

# February 5, 2009 9:38 PM

Rob Conery said:

I’m never shy about my opinion – why start now? I’ve been reading a lot of posts flying

# April 23, 2009 8:58 AM

Helper Code said:

I have been outside of the whole website creation in .NET scene for too long. Although I never stopped

# April 28, 2009 4:32 PM

I Spose I’ll Just Say It: You Should Learn MVC | Rob Conery said:

Pingback from  I Spose I’ll Just Say It: You Should Learn MVC  |  Rob Conery

# November 11, 2011 4:38 AM