Java Reference
In-Depth Information
14
Ajax
Since its inception, the Internet has used a transaction-like communication model; a browser sends
a request to a server, which sends a response back to the browser, which (re)loads the page. This is
typical HTTP communication, and it was designed to be this way. But this model is rather cumber-
some for developers, as it requires web applications to consist of several pages. The resulting user
experience becomes disjointed and interrupted due to these separate page loads.
In the early 2000s, a movement began to look for and develop new techniques to enhance the user's
experience; to make Web applications behave more like conventional applications. These new tech-
niques offered the performance and usability usually associated with conventional desktop applica-
tions. It wasn't long before developers began to refi ne these processes to offer richer functionality to
the user.
At the heart of this movement was one language: JavaScript, and its ability to make HTTP requests
transparent to the user.
What Is Ajax?
Essentially, Ajax allows client-side JavaScript to request and receive data from a server without
refreshing the web page. This technique enables the developer to create an application that is
uninterrupted, making only portions of the page reload with new data.
The term Ajax was originally coined by Jesse James Garrett in 2005. He wrote an article entitled
“Ajax: A New Approach to Web Applications” (www.adaptivepath.com/publications/
essays/archives/000385.php). In it, Garrett states that the interactivity gap between web and
desktop applications is becoming smaller, and he cites applications such as Google Maps and
Google Suggest as proof of this. The term originally stood for Asynchronous JavaScript + XML
(XML was the format in which the browser and server communicated with each other). Today,
Ajax simply refers to the pattern of using JavaScript to send and receive data from the web server
without reloading the entire page.
Search WWH ::




Custom Search