ASP.NET
  Home arrow ASP.NET arrow ASP.NET Web Forms Weaknesses
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

ASP.NET Web Forms Weaknesses
By: Xianzhong Zhu
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 3
    2008-11-11

    Table of Contents:
  • ASP.NET Web Forms Weaknesses
  • The HTML Tag Weakness
  • Code Explained
  • The JavaScript Weakness
  • Last Example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    ASP.NET Web Forms Weaknesses


    (Page 1 of 5 )

    Last time we began comparing ASP.NET Web Forms with ASP.NET MVC. We examined the strengths of Web Forms. This time we will start by taking a close look at its weaknesses. This is the second part of a four-part series.

    The Weakness of ASP.NET Web Forms

    On the whole, the weakness of the traditional ASP.NET Web Forms solution mainly lies in the following four aspects. Let's check each of them one by one.

    (1) ViewState and Postbacks

    Maybe the most disputable point people often bring forward about ASP.NET Web Forms relates to ViewState and Postbacks. To introduce an event-driven approach and overcome the stateless nature (and also obstacle) of HTTP protocol to simulate the old Windows form model development experience, ASP.NET Web Forms introduces ViewState and Postback. The end result is both ViewState and Postbacks have caused lots of problems and increased the complexity of web application development. Even simple web pages can produce a ViewState larger than 100KB in size that heavily affects the performance of the application sometimes.

    Is ViewState is a must have in an ASP.NET application? In fact, most existing web pages usually feature a good many hyperlinks. When you click one of the links, you will be navigated to a new page. Since clicking the links will lead you to another page, what is the use of ViewState within the page? In practice, when I start to write a new web project, the first thing I do is turn off the enableViewState (and sometimes enableSessionState) parameter from inside the Web.config file.

    Some may ask me what sense there is to using Web Forms since I turn off ViewState. My answer is: there are many reasons. Web Form provides a control model, and so users can take advantage of the easy-to-grasp mode to set/get the value of a text box, and also, they can use many button events easily to write related event handlers to trigger various business logics. Moreover, using Web Forms is simple and clear.

    Well, without ViewState why can you use the events of the controls? Of course, you can if the events are not complex ones. Here is an example. The TextBox's TextChange event belongs to complex events, as well as the Command event of the GridView control. However, the click event of a Button control is the "simple event."

    As with the event, there are also complex states and simple ones. Take, again, for example: the state of each sub-control within each line inside the GridView control is a "complex state," while the Text property of a TextBox control belongs to a "simple state." "Complex states" and "complex events" require ViewState, while the simple ones do not. So, why not try to use simple states and events instead of complex ones?

    One of the most prominent and significant features of ASP.NET Web Forms lies in its powerful (and complex) component model. Inside this model was introduced something named "page life cycle." Many people threw stones at it and accused it of killing system performance. In essence, this complex life-cycle does, at some times, run without any efficient result again and again. However, assuming that the ASP.NET "page life cycle" kills performance is not right.

    Suppose that you put 1,000 to 10,000 button controls on an .aspx page. I pledge that the application runs quickly. In real environments, what leads to low efficiency lies in many aspects: the database access solution, the buffer mechanism, asynchronous invocation, the web server related payload balance, and so forth. These factors need to be carefully taken into consideration.

    More ASP.NET Articles
    More By Xianzhong Zhu


       · Excellent article! Ive been complaining about WebForms to senior C# people for years...
     

    ASP.NET ARTICLES

    - Developing a Mini ASP.NET AJAX Server Centri...
    - Disadvantages of the ASP.NET MVC Framework
    - Advantages of the ASP.NET MVC Approach
    - ASP.NET Web Forms Weaknesses
    - ASP.NET Web Forms Meets ASP.NET MVC
    - Source Code for Saving and Retrieving Data w...
    - Using GridView to Save and Retrieve Data wit...
    - Handling Dynamic Images in ASP.NET 3.5 AJAX ...
    - Retrieving Data with AJAX and the GridView C...
    - Playing with Images in ASP.NET 3.5 AJAX Appl...
    - Saving and Retrieving Data with AJAX
    - Enhancing PHP Via the ASP.NET AJAX Framework...
    - Enhancing PHP Programming with the ASP.NET A...
    - Classes and ASP.NET AJAX
    - Using ASP.NET AJAX

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT