views:

150

answers:

7

With the upcoming rise of AJAX applications on the web, I wrote some own pieces of code to understand what it is about. I know there must be easier ways than directly dealing with the XMLHttpRequest object and thought this is why all the AJAX frameworks were created.

However, when I had a look at some of them, I mostly found documentation on how to create visual effects and how to manipulate the DOM tree easily. I don't understand why they call themselves AJAX frameworks then, as I consider a AJAX framework as something which helps me to manage sending HTTP requests and processing the responses.

Am I missing the point? What is about those frameworks?

+7  A: 

Once you've got data back from the server you'll want to display it somehow. The sensible way to do this is through DOM manipulation. And most people using AJAX are doing so because they want to turn a static web page into a dynamic visual application. Hence the focus on visual effect.

pjc50
+7  A: 

YUI says:

The YUI Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.

jQuery says:

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

MooTools says:

MooTools is a compact, modular, Object-Oriented JavaScript framework designed for the intermediate to advanced JavaScript developer.

Prototype.js says:

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

So, none of the first four frameworks that I thought of describe themselves as being an "Ajax framework".

It sounds like the Chinese Whisper effect has just caused ignorant third parties to misdescribe them to you. The term Ajax, like DHTML, has gained a substantial number of people who use it to mean "JavaScript" rather then its actual meaning.

David Dorward
great explanation
01
A: 

Not having developed any AJAX frameworks, all I can say is that AJAX alone does not make for a very useful client-side app. And when you start adding in code to support, say, automatically filling a with the response from an AJAX call, why stop there?

kdgregory
+2  A: 

Shortly after the term "AJAX" was invented, its definition broadened to mean "rich user interfaces created using HTML and JavaScript". It's wrong, but there it is.

RichieHindle
And of course Ajax usually isn't A(synchronous)J(avascript)A(nd)X(ML) any more. Most Ajax queries I've written or looked at use either plain text, HTML or JSON - very rarely do they use XML.
Colin Fine
Indeed, the only constant with ajax is the javascript: ajax may be synchronous, and need not use xml at all.
Here Be Wolves
+1  A: 

Most of the frameworks like Prototype, JQuery are basically "JavaScript Frameworks" and not "Ajax Frameworks". They provide wrapper methods for performing Ajax operations more easily and in an elegant way.

Kirtan
+3  A: 

Not Ajax Frameworks, but rather Javascript libraries
I think you miss-written their name. Instead of saying "Ajax frameworks" you should say "Javascript (or client) libraries", because they provide much more than just pure XHR handling. How much? Depends on the library. All of general purpose libs support DOM traversal/manipulation and Ajax.

Robert Koritnik
A: 

Can't speak for the other frameworks but the YUI deos make using AJAX easy - see this page http://developer.yahoo.com/yui/connection/

Gareth