The dead-end of Web Forms

I had a talk last week at BASTA about ASP.NET MVC vs. Web Forms and I repeat the same talk today here in London at Software Architect conference. (Well, repeating a session is a big term for me--I'll never be able to repeat the same session the same way two or more times...).

The key question that people ask, the only answer they want to hear, is about which one is preferable to use for the next project. Clearly, the natural answer would be a classic "It depends". My rule of thumb is fairly simple

  • If ASP.NET works for you, then stay with it.
  • If you start complaining about limitations you experience (not limitations others say you are experiencing), then look ahead.
  • Once you decided to take the plunge into ASP.NET MVC go ahead and never hesitate. If you seem not understanding it very well, study it more.

When introduced, Web Forms was a cutting edge solution and it just engineered current best practices. But it was ten years ago. We could argue whether it was the right choice to engineer ASP practices ten years ago. In fact, more or less at the same time Sun did it differently when they architected JSP.

There's not much more you can expert or achieve with Web Forms than you do today. OK, tomorrow, with version 4. This is the dead-end of Web Forms.

If it doesn't serve you any more the way you like, change it. It will be a change for the better. But the better is also different and requires a different approach and skills. Design is design, and with ASP.NET MVC (which is far from perfection, by the way...), you need to gain design and architecture skills.

My next book is just on ASP.NET MVC (February 2010) and will target version 2. Like many other books of mine it won't be an how-to book. And I'm taking architecture and design very seriously as I explain controllers, views and models. Stay tuned. And plan your design training :) Contact me... ha ha ha Smile.

 

 

 

 

 

Published 01 October 2009 04:01 PM by despos
Filed under:

Comments

# Remy said on 01 October, 2009 11:11 AM

Our App is built out of many User Controls that are resused all across the page. For example a Comment Control.

I have not found a way to reuse such components in MVC? It's ok to rewrite them, but it sounds I have to implement every page from scratch, no?

# The dead-end of Web Forms - .NET Architectonics Scripts Rss said on 01 October, 2009 02:33 PM

Pingback from  The dead-end of Web Forms - .NET Architectonics Scripts Rss

# tony2005 said on 01 October, 2009 02:46 PM

WebForms work well for many users including myself and it has been productive for me. I can work around most of its limitations and looking forward to 4.0. I don't follow any 'hype'. MVC is still in its early stages. Once MVC has the quantity and quality of the current commercial server controls, more people will adapt it. I just don't have the time to hand craft all my html. The available MVC helper methods are still evolving.

# GlishGeotte said on 01 October, 2009 03:33 PM

Интернет магазин косметики Slims.ru-это лечебная косметика.  

Косметика  "Аптекарь Шеллер", Органическая ампулированная космецевтика "Teana" (Тиана), "Эвиналь" на экстракте плаценты, Medical Collagen 3D, Маски " Дизао", Крема и лосьоны для загара  и др... Бижутерия и аксессуары, косметические аксесcуары. Для детей.  Подарки. Товары для здоровья. Звоните(495) 925-51-40 и заказывайте.

# Twitter Trackbacks for The dead-end of Web Forms - .NET Architectonics [asp.net] on Topsy.com said on 01 October, 2009 05:07 PM

Pingback from  Twitter Trackbacks for                 The dead-end of Web Forms - .NET Architectonics         [asp.net]        on Topsy.com

# Estevez said on 02 October, 2009 02:28 AM

I think WebForms is good only because it has a several Controls (visual components) shipped with the VS, and those webcontrols and webforms had ViewState.

I wish for Controls for MVC.NET, with ViewState :)

And codebehind for Views. That would be perfect.

Views without codebehind are just returning to stoneage.

# ??Est??n los controles m??viles de ASP.NET muertos? « Blog de Francisco Vel??zquez said on 02 October, 2009 04:06 AM

Pingback from  ??Est??n los controles m??viles de ASP.NET muertos? «  Blog de Francisco Vel??zquez

# El final de ASP.NET WebForms « Blog de Francisco Vel??zquez said on 02 October, 2009 04:13 AM

Pingback from  El final de ASP.NET WebForms «  Blog de Francisco Vel??zquez

# Darth_helge said on 02 October, 2009 05:55 AM

Estevez: It seems to me that you are in fact satisfied developing with webforms. Simulating state is one of the best arguments using webforms. My guess is that you are curious about this MVC platform and want to try it out, but you can't force MVC to become like webforms.

# Jason Haley said on 02 October, 2009 08:04 AM

Interesting Finds: October 2, 2009

# Alex James said on 02 October, 2009 12:22 PM

Dino,

Completely agree. As always 'it depends' is the answer. I rail against people who see things in black and white. As we become wiser we see more depth and color in every decision...

Alex

# Estevez said on 05 October, 2009 03:19 AM

Darth helge: you must be right. My wishes were just teoretic.

As I use MVC.Net I like it's structure better than WebForms. I just had to write a form with thousend lines where javascript, server scripts and HTML were mixed. Maybe just I should structure my code better way.

(And ... while it is illegal or Out Of Pattern, we can still use codebehind, or use just pure classes for background operations)

# Ryan Roberts said on 05 October, 2009 09:50 AM

>Our App is built out of many User Controls that are resused all across the page

This can be supported per-project using partial views, and you can transfer them between projects using good old fashioned file copy, or by compiling and loading them from resources.

>Once MVC has the quantity and quality of the current commercial server controls, more people will adapt it

It is very unlikely that MVC will ever support a third party market in server side controls. The component model is just not there and attempting to implement one would end up reinventing webforms. Client side components are a more viable option for MVC.

RAD/scaffold support for data driven models is very possible with the MVC pattern however, as things like the Django admin system generator demonstrate. Out of the box ASP .NET MVC has a silent 'M' which unfortunately means that you don't get the instant productivity of the various opinionated OSS MVC frameworks.

Leave a Comment

(required) 
(required) 
(optional)
(required)