A completely biased comparison of ASP.NET MVC and Webforms

I have to admit I am total bias towards MVC but hear me out. I have yet to work in an organization that implements an OOP or even MVP when using WebForms. It’s all been directly bound controls to data readers/sets/tables. No object model, no business object layer, page_load is used and abused, etc. It can’t be stated enough that MVC will not save a project from the bullshit code that is forms over data crap but at least there is hope in the form of a tiny amount of guidance from Microsoft. </rant>

Introduction

In the .NET world the MVC pattern is relatively new but it has been the staple development architecture for Java and Ruby for over a decade. Most of the current the debate between what technology is “better” is argued from a developer’s point of view. While the technical underpinnings of a technology can often translate to the projects success; I feel that both WebForms and MVC are mature enough that most projects will do fine with either.

The technical debate does nothing for those who are trying to persuade their organization to consider ASP.NET MVC. What I am trying to present here is a list of decision points an organization can use when deciding on MVC vs. WebForms.

ASP.NET WebForms

Through the abstraction of HTML, CSS, and JavaScript; ASP.NET WebForms attempts to recreate the experience of developing a desktop application. The entire HTTP protocol is successfully abstracted away and developers are present with a faux statefulness that mimics desktop applications. Development teams are able to use a WYSIWIG style of development.

ASP.NET MVC

Out of the box ASP.NET MVC forces developers to understand HTML, CSS, and JavaScript. There is little to no abstraction which can be a double edged sword. On one hand your development team has access to the raw power of the markup & languages that make up the web. On the other; if your development team is not experienced with HTML, CSS, and JavaScript there might be a learning curve.

Decision Matrix

ASP WebForms

ASP.NET MVC

Your project is small and your team is not experienced with MVC

Your project is large (experience with MVC not required)

Your project requires many specific 3rd party vendor components

Your project is not bound to 3rd party vendor components (The UI can still be very rich)

Your project team is not comfortable with open-source libraries (expecially jQuery)

Your project team is comfortable with open-source libraries (especially jQuery)

Your customers requirements, possibly by contract, will not change during development

Your customers requirements may change during development

Your project will never be "extended" or have a feature "added"

Your project maybe be "extended" or have features "added"

 

Your project is mission critical and deserves the comfort provided by unit testing

 

Your project is limited in maintenance hours

 

Your project cares about HTML markup compliance

Conclusion

I think that most projects will be able to succeed using either technology. The question is simply how much pain will you cause your developers? Will you stick with web forms and create an endless maintenance cycle? We know how much developers love maintenance programming. Or will you force them out of their comfort zone and make them learn something new for the sake of your project?

Related posts:

  1. A somewhat less biases comparison of MVP and MVC
  2. ASP.NET MVC New Project Replace Webforms with Spark
  3. Toolset 2009



2 Responses to “A completely biased comparison of ASP.NET MVC and Webforms”

  1. A completely biased comparison of ASP.NET MVC and Webforms – Eric Polerecky…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  2. [...] to VoteA completely biased comparison of ASP.NET MVC and Webforms – Eric … (5/15/2009)Friday, May 15, 2009 from Eric PolereckyThe technical debate does nothing for those who are trying [...]

Leave a Reply