Michael Knopf

turning concepts into working products...

ASP.NET Web Form Disadvantages
Michael Knopf
Published: Monday, September 15, 2008
The basics of building a site using ASP NET are straight forward and made easy with tools such as Visual Studio. ASP.NET web forms have come a long way since they were first introduced with the .NET framework, however we have come to discover that Web Form are problematic and regularly under-perform. 

Web Forms have some severe set backs, most notably is that we are limited to a single Form tag on a page which requires the entire contents of the page to be posted back and processed by the server, even if the only change is the selection of an item in a drop down menu (where the drop down menu needs to auto-postback to allow us to perform some other kind of logic). This is a HUGE disadvantage as the developer can not process parts of the page in the same manner we would have using normal HTML elements and multiple form tags which enable partial-page processing. 

Another major disadvantage is VIEWSTATE, Microsoft's answer to page state management. Viewstate stores just that, the state of elements on the page, so that the developer no longer has to specifically handle this on a postback. However VIEWSTATE bloats the page, often enormously, and becomes a major problem when a page contains lots of controls and data, causing huge performance lags as all this data must be passed back and forth to the server on each postback which is only further impacted by the "single form tag" problem. 

Fortunately Micorsoft has recognized these disadvantages and has introduced the ASP.NET MVC Framework as the replacement for the Web Forms model we have been working with for many years now. MVC moves us back to the familiarity of typical HTML forms processing and encourages cleaner, more testable, code by following the Model View Controller architecture construct. This facilitates code creation that can achieve 100% code coverage via automated tests, something that Web Forms made much harder. 
What Others Are Saying:
6/23/2009 1:32:43 AM phiree
agree with you.
7/25/2009 8:32:09 PM Marcelo Lopez Jr
I agree, and disagree. ASP.NET MVC ( as it exists at the moment ) does not lend itself easily to heavy data-driven LOB enterprise development. My view is that it's a GOOD THING to have both alternatives to turn to from within the .NET SOI ( Sphere Of Influence ). LOB applications will probably remain a better alternative for WebForms( and to a lesser degree, WinForms ), and that's not necessarily a bad thing. Most web-based corporate enterprise portal don't necessarily need the level of SEO and RESTFUL-ness that many people try to push for ( I'm pointing at you purists out there ). In some respects ASP.NET MVC feels moreso a response to things like Spring MVC, on the Java side. My one most blaring issue with ASP.NET MVC is, and with WebForms has been, "HTML or other markup not polluted with programming semantic".