Chapter 3. Ajax

Ajax is the set of technologies on which Atlas is built. And although Atlas does its best to hide the technical details of Ajax, to understand what is possible with Atlas and to create advanced applications that extend the framework for your own needs, you must have a detailed knowledge of Ajax.

The term “Ajax” was coined by Jesse James Garrett in early 2005 in his essay “A New Approach to Web Applications” (http://www.adaptivepath.com/publications/essays/archives/000385.php). However, only the term is new, not the technology itself. Although XML can be part of an Ajax application (but doesn’t have to be!), and some CSS may also be in the mix, the foundation of any Ajax-powered application is JavaScript.

In this chapter, we’ll cover the three most important JavaScript technologies used to deliver Ajax behaviors to web apps. They are:

XMLHttpRequest

The JavaScript object that takes care of making (asynchronous) HTTP calls

XMLDocument

The JavaScript object used to parse and access XML data

JavaScript Object Notation (JSON)

An alternate data format that can be used instead of XML to exchange data between client and server without the burden of XML parsing

In this chapter, you’ll create web pages that involve both client script in the browser and web server backend processing.s Therefore, the examples in this chapter and the rest of the book will involve working with ASP.NET and with .aspx pages.

The XMLHttpRequest Object

The foundation of Ajax is the XMLHttpRequest object, ...

Get Programming Atlas now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.