The Devil and his minions: ASP.Net webforms and 3rd party web toolkits

Posted by Dan on May 19, 2010 in Development |

I am what you would call anal. Anal for total control over performance in my applications. I want to wring out as much performance as I possibly can. The web forms engine from Microsoft for their ASP.NET framework stop me from doing that. Web forms are bad for two reasons (I am sure there are more, but I will just talk about two) – 1) Developers do not have full control over what the end result of the page is, and 2) postbacks. Let me focus on postbacks today (I will talk about the rendering control at a later time). With the ASP.NET web forms engine, postbacks are a regular occurence in the user experience. If you go around on your favorite web site, and click a button and it refreshes the page, that is a postback. Postbacks are a necessary thing for web applications, but no where the amount that web forms give us.

This is where 3rd party controls typically come in. They usually offer Ajax capabilities that streamline the user experience by hiding the postback a page may execute. With most Ajax calls generated by 3rd party controls, they go through the whole life cycle of the page, the rendering of the page is just localized to the section of the page that you as an end user interacted with. Now some would say that the full page postback is a necessary evil for rapid development. I disagree. 3rd party controls act as a black box for developers. We know what the end result is, but we rarely investigate what is actually going on to make these controls act as they do. I am on the side of taking the time to do it all manually. Screw the controls! I would rather take the time to do it myself, and have complete control of the implementation with the ability to change it if need be. It strengthens you as a developer.

Enter jQuery. I absolutely love jQuery. For those not familar with jQuery, it is a lightweight javascript library that has taken the web 2.0 world by storm. There may be those of you that are saying to yourself “But Dan, isn’t that just another 3rd party toolkit?” Well yes and no. Yes it is something that I did not create, but it is completely extendable and the source code is available for viewing! I really like that. Also, with jQuery the concept of postbacks go away. I have another motto – a page in a web application should only render once. Anything else should be Ajax calls and plain old javascript. Now if only I could convince my bosses to go to ASP.NET MVC (but that is another post for another day).

Tags: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

Copyright © 2010-2012 Dan Appleyard All rights reserved.
Desk Mess Mirrored version 1.9 theme from BuyNowShop.com.

Load Times Plugin made by Cheap Web Hosting