Welcome to AspAdvice Sign in | Join | Help

AzamSharp

Some day I will know everything I hope that day never comes

Syndication

Tags

Navigation

Choosing an Ajax Framework Performance vs Easability

A week ago I started a poll in which I asked "Which Ajax framework do you mostly use?" with the following choices:

ASP.NET AJAX

AJAX PRO Library

Anthem.NET 

Plain XmlHttp Object

The winner by a long margin was the MS ASP.NET AJAX. Surprising! not really. MS ASP.NET AJAX framework might not be the slickest framework in the market but without any double it is one of the easiest one to use. The real power lies in the UpdatePanel control which can update a portion of the page using client side postbacks. Just put your control inside the UpdatePanel and it will do the rest (at least for most of the cases).

Performance wise ASP.NET Ajax framework is not good. There are couple of reasons. First the size of the Client Framework JavaScript library is pretty huge. Second although it is asynchronous it does follow the complete life cycle of the page which kills the performance. The selling point of the MS ASP.NET AJAX is that it took away the complexity to build the updated user interface.

Let's consider a real world scenario. The poll control which is displayed on the GridViewGuy is NOT using the ASP.NET AJAX framework. It uses ASP.NET 2.0 client callbacks to make XmlHttp requests to the server's method. Each time you mark a choice and submit your vote I build the user interface for the result of the poll on the server side. The processing can be done on the client but that requires lot of JavaScript. Anyway, MS ASP.NET AJAX helps you to forget about the updated interface as the UpdatePanel takes care of that and because the whole page life cycle is repeated with the ViewState and stuff.

So, which Ajax framework should you use?

My humble answer will be to mix it up. Use MS AJAX where the user interface update is complex and use ASP.NET client callbacks OR third party libraries when making simple calls and making simple updates. The reason I pressed on using ASP.NET AJAX when the interface is complex is because you definitely don't want to create the interface again. So, leave this job for ASP.NET AJAX UpdatePanel.

Sponsor

Published Friday, November 02, 2007 5:40 PM by azamsharp

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Choosing an Ajax Framework Performance vs Easability @ Thursday, November 08, 2007 9:47 AM

I would like to draw your attention to another alternative which is a paradigm shift for AJAX front ends. One should be aware that I am not, and do not pretend to be objective, never the less I believe that one can judge for himself. Visual WebGui is an open source rapid application development framework for graphic user interfaces of IT web applications. VWG replaces the obsolete paradigms of ASP.NET in both design-time and run-time which were designed for developing sites, with WinForms methodologies, which were designed for developing applications. Thus enabling designer that was designed for application interfaces (WinForms designer) instead of a word documents (ASP.NET designer). This provides the developer with an extremely efficient way to design interfaces using drag and drop instead of hand coding HTML. Visual WebGui is an AJAX frame work that doesn’t expose logic, data or open services on client requests and therefore is not as vulnerable as common AJAX solution.. VWG presentation layer is de-coupled and instead of standard browser it can, and will run Silverlight. NO!!! Visual Webgui is not!! Not a component library – It is a complete revised approach to developing web applications. not a JavaScript generator – It runs on the server controlling the browser using a small static JavaScript kernel. Not for developing sites – It was designed to provide for developing IT web applications GUIs. Not a closed / locked-in framework – It has many extensibility features, which allow integration of legacy resources (ASP.NET or DHTML resources) and the development of custom controls and behaviors. Worth a look at www.visualwebgui.com,

navot

Leave a Comment

(required) 
required 
(required) 
Enter the code you see below