One of the most important challenges web application developers face is the requirement for a fast and responsive user interface. AJAX was primary designed and developed with the intent of providing a fast and responsive user interface to address these challenges. According to Enrich Peterson, “AJAX-enabled pages provide a slick, responsive user experience, making web-based applications function more like desktop-based ones”.
This article guides the reader through this new technology, its features, benefits and applicability in web application development. This is the first in the series of articles on Ajax (and more specifically ASP.NET AJAX). Although Ajax is independent of the technology with which it is implemented (you can implement Ajax enabled web applications using Java, Microsoft .NET or many other programming models), I will discuss implementation of Ajax in ASP.NET, how we can consume Web Services using AJAX, etc, in this series.
The primary advantages of using Ajax in web application development are as follows.
Ø Reduction of unnecessary web server hits, i.e., the round trips are minimized
Ø Rich, responsive user interface
Ø Real-time web page updates
Ø Language neutrality
Ø Faster web page renderings
Ø Less consumption of server’s resources (memory and processor load is reduced)
In the Ajax enabled web applications, requests are sent to the server only for the data that is needed. The entire web page is not submitted at one go.
How does AJAX work?
The key to the success of AJAX lies in the way it works. “Asynchronous” as it is called, implies that in the earlier days, the web applications used to be synchronous. This reminds me of the term “serial multi-tasking”, the type of multi-tasking the DOS Operating System used to support. A synchronous nature of execution implies that until and unless a request is complete in all respects, another cannot start. In other words, the requests have to be executed one after the other.
In an Ajax enabled web application, the runtime loads the Ajax engine instead of loading a webpage at the beginning. This engine is responsible for both rendering the data for the user interface and also communicating with the web server for transporting data back and forth. “The Ajax engine allows the user’s interaction with the application to happen asynchronously — independent of communication with the server.”
AJAX and ASP.NET
The ASP.NET 2.0 framework incorporates the client script libraries of the ASP.NET Ajax framework. Note that ASP.NET AJAX is an extension of the ASP.NET server-based development framework. You can use ASP.NET AJAX to build web applications with rich user interface and improved response times. “The framework includes two distinct yet not mutually exclusive API’s: client and server, which enable the developers to accomplish AJAX functionalities using direct client-side programming, traditional server-side programming, or any combination of both”.
Available ASP.NET Ajax Frameworks
These are several of Ajax frameworks for ASP.NET that you can choose from. The following are some of the best Ajax frameworks.
ASP.NET AJAX from Microsoft
The ASP.NET AJAX Control Toolkit
The ASP.NET AJAX Control Toolkit from Microsoft is a community project that comprises of a SDK and code samples. According to Microsoft, “The ASP.NET AJAX Control Toolkit provides a set of sample controls and extenders that makes it a snap to spice up your web site with rich functionality”.
You can download the Ajax Control Toolkit from the following link:
AJAX Downloads and Resources
You can download AJAX from the following link. This is the official link for ASP.NET AJAX resources. http://ajax.asp.net/downloads/