ASP.NET AJAX - Ajax Server Extensions sample

In ASP.NET AJAX, the Ajax Server Extensions consists of a powerful set of server controls that simulate Ajax behavior on the client. In other words, these controls do not perform Ajax in its traditional sense (JavaScript calls to a server and dynamic updates with dhtml) but rather in a different way that gives the same illusion to the end user.

To demonstrate the power of these controls, I've taken an existing ASP.NET application that suffered from normal, pre-ajax symptoms like page refreshes, static content and loss of interactivity and added the controls to make it a more engaging experience. The goals for the task were as follows:

  • Improve network latency - cut back on the amount of data being passed back and forth between the server and browser
  • Eliminate unnecessary page refreshes - keep the user connected to the application and the interaction as fluid as possible
  • Keep UI and application logic on the server - This spares us from exposing ui logic to savvy web users (like yourselves) and also gives us the luxury of supporting the rare cases when a browser has JavaScript disabled
  • Seamless and transparent integration - Keep intact the existing logic on the server and make integration as unintrusive as possible
  • Stick to familiar paradigm - leverage the server controls as much as possible to provide the typical ASP.NET developer a familiar paradigm to work with

Along the way I also tried to exercise some common, recommended patterns for ASP.NET AJAX:

  • Set UpdateMode for UpdatePanels to Conditional
  • Placed ScriptManager in master page, leveraged ScriptManagerProxy for content pages
  • Avoided gratuitous animations - kept animations subtle, relevant and simple
  • Set Timer control interval to a high value - the timer actually runs on the client, we should be mindful of their resources

The application manages to use all of the controls in the AJAX Extensions (not the Futures CTP). For a little extra, it includes the AutoCompleteExtender for the search box. By the way, this control is now in the Ajax Control Toolkit - where it belongs.

The code for the application, written for the 1.0 release; can be downloaded here (requires SQL Express).

Below is a snapshot of the application in action:

Ajax Server Extensions

 

1 Comment

Comments have been disabled for this content.