Web Forms vs. ASP.NET MVC
Probably I'm a bit late to the party, but as I gain confidence with ASP.NET MVC I feel I have my cents to share :-)
ASP.NET MVC is not the anti-Web Forms and Web Forms is not the anti-pattern of ASP.NET development. ASP.NET was created 10+ years ago and in the late 1990s the MS platform was VB-oriented. So it was a natural choice to design ASP.NET as a stateful framework over a stateless medium--the Web. Many of the hot features in ASP.NET (postback, viewstate, forms authentication/authorization, server controls and abstraction over HTML) were eagerly welcomed by the community because they were time-saving facilities just implementing common features that everybody would have aboard.
Over years, MS probably failed drawing Web people attention on architecture and software design. There was an interesting attempt made with the Web Client Software Factory to implement MVP and workflow-based page navigation in Web Forms pages, but that turned out to be too far complex. At least, in my opinion. So in some way instead of driving Web Forms towards a better design it seemed preferable to introduce a new framework on the wave of the success gained by RoR and MonoRail. To many people, ASP.NET MVC looks like the new way to go and the only way to achieve SoC, testability, better design.
For sure, ASP.NET MVC is a "new" ASP.NET designed ten years later looking at the current state of the industry and evolution. Comments on Web Forms vs. ASP.NET MVC are often biased and stuffed with pieces of personal experience that is elevated to the rank of absolute, objectives facts.
The table below lists my top-ten undisputable facts about ASP.NET MVC and Web Forms. These are facts--everything else, I believe, are opinions. And like all opinions they are fully respectable. At the end of the day, Web Forms and ASP.NET MVC is like car or motorcycle and ... it's up to you, your skills, your education, your attitude, and your project requirements.
-
Web Forms is hard to test
-
ASP.NET MVC requires you to specify every little bit of HTML
-
ASP.NET MVC is not the only way to get SoC in ASP.NET
-
Web Forms allows you to learn as you go
-
Viewstate is not the evil and can be controlled/disabled
-
Web Forms was designed to abstract the Web machinery
-
ASP.NET MVC was designed with testability and DI in mind
-
ASP.NET MVC takes you towards a better design of the code
-
ASP.NET MVC is young and lacks today a component model
-
ASP.NET MVC is not the anti-Web Forms
On this topic, an article on MSDN Magazine is coming out in the July 2009 issue. A Web architecture book is being published these days and I'll start soon on the MS Press big book guide on ASP.NET MVC to be available towards end of the year.