What is AJAX programming?

Remember when the web consisted of nothing more than a few static web sites coded exclusively with HTML? Life was simple back then. Back in 1996, a website could be created in a few minutes by inserting the content into a basic HTML template, and adding some graphics for style. Now, the internet is populated with web sites that are more complex. Modern web sites use anywhere from two to sometimes twenty different programming languages, specifications and scripts. Some of the code runs on the front end, some runs on the back end, and some runs somewhere in between.

We have the wireless revolution to thank for making web programming so arduous. Most wireless devices, such as cell phones, palm tops, laptops, and even computer screens in automobiles, now come equipped with access to the internet and email. These gadgets have web browsers and platforms that are very different from what is installed on a traditional desktop PC. Wireless browsers are often not compatible with many elements of the HTML programming language. Web programming had to evolve to suit the needs of those that surf the net on wireless computers.

As a result, a deluge of new languages and systems for designing websites were introduced. These new innovations include XML, XHTML, XSL, CSS, JavaScript, VBScript, DOM, and many others. Of these, XML was probably the most important, because it enabled web designers to define data without forcing web browsers to display it a certain way. XML files were simple text files that could be interpreted by any web browser, unlike HTML. So, you ask, what is AJAX and how is it connected to this discussion?

Well, AJAX is a confluence of all these different programming specifications. AJAX itself is not a language; it is a technique that makes use of all these different components. Also, AJAX web sites can interact with the user by responding to input and changing certain parts of a web page without reloading the entire page.

AJAX makes use of several components. One component is called Cascading Style Sheets (CSS). CSS is an easy way to create web sites by specifying certain intricacies and style preferences for the page layout as part of a separate file that can then be imported into any HTML document by simple referring to the CSS File. The second part is XHTML, which is a more versatile version of HTML that is compatible with XML files. AJAX also uses the Document Object Model (DOM), which is a standard set of objects that can be used to modify web documents. The other components are scripting languages such as JavaScript and VBScript, and it also uses XML, which we have already described.

Microsoft is credited with the inspiration for AJAX when in 1998 they developed something called remote scripting to make web pages more interactive. Later on, remote scripting was taken to newer heights by other talented programmers, and eventually, AJAX was the result.

Some of the advantages of it are that it can be used to create sites that are extremely interactive, and it loads very quickly and occupies very little bandwidth. The drawbacks are that it can sometimes inhibit the use of the back button on the web browser, and sometimes the code has a problem initiating the response that it has been programmed to produce.

If you design web sites for a living, you should probably learn how to implement all of the languages described here to make your sites more interactive. If you have never studied or used XML, XHTML, JavaScript, or VBScript, you should enroll in some courses at a local computer programming institute. The use of these languages is growing as more people are connecting to the internet with wireless computers that require more flexible languages to display web sites properly across all platforms and browsers.

About the Author: Jim Pretin is the owner of http://www.forms4free.com/, HTML forms and Formmail, a service that helps programmers make email forms.