Datasheet

client script and MSXML in 2003. The problem with the technology at that time was the need to manually
create the necessary client-side JavaScript. In 2003, there was too much code overall that had to be written
and too much custom code that had to be written to get this to work. Only since the second half of 2005
have client-side libraries and server-side support for ASP.NET started to make their presence felt and been
used significantly.
The mainstream development community has only recently started using the technique. The release of
Google’s Suggest and Maps are what really opened the eyes of the users to the development technolo-
gies. These applications sent a shockwave through the development community.
Technologies That Make Up AJAX
AJAX is a general umbrella term. AJAX itself stands for Asynchronous JavaScript And XML. The term
was coined by Jesse James Garret of Adaptive Path in an essay published in February 2005 (
http://
www.adaptivepath.com/publications/essays/archives/000385.php
) and was quickly accepted
by the development community.
Based on this general umbrella term, take a look at the specific items that make up AJAX:
XMLHttpRequest
XMLHttpRequest allows the browser to communicate to a back-end
server. This object allows for the browser to talk to the server without requiring a postback of
the entire web page. With Internet Explorer 5 and 6, this capability is provided by the MSXML
ActiveX component. With the Mozilla Firefox, IE 7, and other web browsers, this capability is
provided by an object literally called
XmlHttpRequest. The XmlHttpRequest object is mod-
eled after the MSXML component and defined by the XMLHttpRequest standard from the
W3C. The ASP.NET 2.0 AJAX client-side JavaScript libraries hide the differences between the
various browsers.
JavaScript — JavaScript provides the capability to communicate with the back-end server. The
version of JavaScript must be version 1.5 or later. Though JavaScript is not specifically required,
it is needed from the standpoint that JavaScript is the only client-side scripting environment
supported across the major modern web browsers. There are other client script languages;
however, these are not supported across all browsers.
DHTML/DOM support — The browser must support the ability to dynamically update form ele-
ments, and the ability to do this in a standard way comes through the support for the Document
Object Model (DOM). By supporting the DOM, it becomes easy for developers to write a single
piece of code that targets multiple browsers.
Data transport with XML or JSON — Using XML allows for the ability to communicate with
the web server in a standard mechanism. The default data format with ASP.NET AJAX is JSON.
What Is ASP.NET 2.0 AJAX?
On June 28, 2005, Microsoft announced “ASP.NET 2.0 AJAX.” ASP.NET 2.0 AJAX is an AJAX-oriented
.NET library that runs on .NET 2.0. Though ASP.NET 2.0 AJAX is an AJAX library and can be used to
perform AJAX operations, it is really much more. ASP.NET 2.0 AJAX offers many of the same types of
features of the server-side ASP.NET, but it is directed at the client side. Because ASP.NET 2.0 AJAX is
fully integrated with ASP.NET, it provides rich integration with the services provided by ASP.NET.
7
Chapter 1: Introduction to ASP.NET AJAX
12830c01.qxd:WroxPro 6/4/07 1:48 PM Page 7