Most people in an industrialized nation have heard of Ajax. It’s a powerful household cleaner that was released in 1947 by Colgate-Palmolive. Of course, that is not the point of the article. No, the Ajax we are referring to has to do with the Internet. You may have heard the term from a friend or seen more mentions of it on the Web. You may be thinking to yourself, “I want my website built in Ajax!” Let’s dispell some misconceptions of what Ajax is and try to better explain it.
First, Ajax is actually an acronym. It stands for Asynchronous Javscript and XML (if you are trying to understand the Web, be ready for lots of acronyms). Second, Ajax isn’t a programming language, but rather programming concept. You may have heard of such programming languages as PHP or Visual Basic (does anyone remember Cobol?). Ajax is simply a way for a programmer to use their programming language.
So let’s get into it. What exactly is Ajax. Ajax is a way for a website to update certain parts of a webpage dynamically without having to reload the whole page. An example of what I mean would be when you fill out a form on a website and click the ‘submit’ button. Your browser’s little “thinking” icon spins and the webpage goes blank for a second and then displays a new page with different information. With Ajax, your screen doesn’t go blank and your browser doesn’t have to think. New information is just displayed.
Let’s take a step back for a second and set the stage. All websites consist of a server and a client. The server is the computer located somewhere in the world that has the website phsyically saved on its hard-drive. The client is your computer and your computer’s web browser. When you visit a website, the server sends the information to your computer, and then your browser displays that information in a nice, pretty fashion. When you submit a form, the information in that form is sent back to the server, the server does with that information whatever it’s supposed to do, then sends an appropriate response back to your computer. Again, your browser displays that response. Whenever your browser talks directly with a server, you get that little spinning “thinking” icon and eventually your webpage reloads with new info.
This is all fine and dandy, but what if you are doing something like flipping through an online calendar or catalog? If your webpage had to reload every time you moved to the next month or next product, that would be a bit annoying, wouldn’t it? This is where Ajax comes in. With Ajax, you don’t need to reload the entire page; only the object you are interacting with gets updated.
A couple of examples of Ajax in action are:
– Spirit Mountain (http://spiritmt.com) – The Spirit Mountain Poll on the homepage.
– Cuyuna Lakes Chamber of Commerce (http://cuyunalakes.com) – The Calendar of Events on the homepage.
As I had mentioned, I want to keep this article simple. There is a lot more to Ajax than this. If you are interested in more details, there are many resources available on the Internet.
– Ajax isn’t new. It’s actually been around since 1995.
– The asynchronous object (such as the XMLHttpRequest Object) was adopted by all major web browsers in 1999.
– The term ‘Ajax’ was coined in 2005.
– Gmail and Google Maps are based much on Ajax.
– Cobol was originally introduced in 1959 and is still in use today. The latest release was in 2002 and a new release is due out soon.