Technologies of AJAX

by Carol Rudenberg.

Share
|
Homepage | Submit your article | Contact | TOS
More articles on ajax and javascript  

You are here: Categories » Computers and technology » AJAX and JavaScript

If you search the Internet for AJAX, you are likely to notice a large number of items popping up under the AJAX name that don't seem to fit my definition. In most cases, these libraries provide the related functionality needed to finish your AJAX application, but other times, these libraries are just someone trying to jump on the AJAX bandwagon. When looking at these libraries and techniques, I divide them into three groups:

  • Those directly used in AJAX

  • Those closely related to AJAX

  • Those that are just part of the rest of the RIA world

Most of the technologies directly related to AJAX are those that make up the "asynchronous" and the "XML" parts of the AJAX acronym. These are the libraries and techniques that provide the communication layer and the ways to encode the data that moves over it. In many cases, this is the XMLHttpRequest object, but IFrames are also popular, and cookies or embedded ActiveX/Java are yet another possibility. The "X" in AJAX is the technique used in the data encoding, and it's an area with a huge number of possibilities. Data can be transferred as plain text, HTML, XML, or any other type of format that might be convenient for the situation.

XML is extremely popular as a data format because it's supported by so many languages and because it is easy to describe arbitrary data types with it. Many times, XML is used to facilitate Remote Procedure Call (RPC) mechanisms, but it can also be used to directly describe the data being transferred. RPC allows for the direct mapping of JavaScript types to the server's data types (PHP, Java, and so on) and vice versa. XML has been used for this purpose before, so it includes many standardized formats such as those used in SOAP, XML-RPC, and WDDX. It can also include a custom XML format created for a specific AJAX implementation.

Another popular approach is to generate JavaScript directly on the server and send it to the client where it can be used directly. This approach is possible because JavaScript can run code from a string using its eval statement. This approach is often used in conjunction with others because the server-side language can't evaluate JavaScript directly, but a specific JavaScript Notation (JSON) can allow JavaScript to be used in both directions. This notation, called JavaScript Object Notation, is often used in RPC approaches because it can describe any data type JavaScript can support while still being easily parseable by other languages.

As we move beyond what is needed to allow for AJAX communication, we get the large set of related technologies. These provide the extra glue and user-interface elements that are needed for a complete AJAX application. These are generally JavaScript libraries; some are stand-alone and just provide a few features; others provide an entire framework for creating dynamic Web pages. In most cases, you'll need some sort of effects library. This library provides fades, swipes, and many other visual effects that can be used to draw attention to the HTML element that you've updated using AJAX.

In addition, there are a number of libraries that provide drag-and-drop functionality, which is less closely related to AJAX but is most useful when used in conjunction with AJAX. Some of these libraries allow AJAX communication in some setups, while they are just a related add-on in other setups. This mix-and-match of libraries is great because you use only what you need to get the job done. Keep in mind, however, that the Web browser will need to download all this JavaScript to actually run.

In the wider world of technologies related to AJAX, you get the JavaScript libraries and other technologies, such as Scalable Vector Graphics (SVG), that might be in an AJAX Web application, but they really don't have a direct relation to AJAX. These technologies make up the wider world of RIA, but they are also more expansive and harder to integrate into existing applications.

Leave a comment or ask a question
Total comments: 0

AJAX and JavaScript Disclaimer

  • The e-articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us to investigate the issue
JavaScript Literals - The raw data that make up the root of data types are called "literals." These are, in effect, literally what they represent themselves to be. Numbers, strings, and Boolean values make up the cor (more...)
JavaScript Variables - I like to think of variables as containers on a container ship. You can put all different types of content into the containers, move them to another port, empty them, and then replace the contain (more...)
JavaScript Operators - Operators can be placed into three categories-binary, unary, and ternary. Binary operators, most commonly associated with the concept of operator, take two (binary) expressions and combine them in (more...)
JavaScript Arrays - Because objects are collections of properties with each property having its own name and value, arrays are actually JavaScript objects. Each property in an array is an element, and each element (more...)
Loops in JavaScript - Loops in JavaScript are similar to loops in C++ and Java and most other languages using loop structures. In this section, you will find explanations of the different types of loops in JavaScript (more...)
Types of operators in JavaScript - Assignment Operators The key assignment operator is the equals sign (=). The left operand is a variable, an array element, or an object property, and the righ (more...)
Conditional Structures - The "thinking" structure in JavaScript is found in the different types of conditional statements in the language. Used in concert with different types of comparative operators, conditional statem (more...)
The ''with'' Statement - Like the ternary conditional operator, the with statement is a shortcut. Instead of having to list all of the properties of an object by repeating the basic object, you can state the bulk (more...)
Operators Precedence - The order in which expressions are evaluated based on their operators is known as precedence. Multiplication and division occur before addition and subtraction, so any operands that are to be mul (more...)
Nested Loops, label and continue Statements - The label statement does not inherently go with the continue statement but, like discussing break with switch and case, you might find it useful to se (more...)

 
free content
    Copyright © 2006 - 2012 e-articles.info.
The texts, articles and tutorials in the directory are property of their respective owners and authors.