daily gadgets, computers, and electronic news
08/05
2005

Ajax Tutorial - Part I

Sponsored Links

This is the English translation for my Ajax tutorial. Original article, written in Indonesian language, can be found here.

Introduction

Ajax is the current rising star in the web development field. Several popular company already started using Ajax, including: Google (Gmail, GMaps, GSuggest, GGroups), Amazon (A9.com), Flickr, and Orkut.

Ajax is not a new technology. It’s a new developing approach, based on the following existing technologies:

  • XHTML and CSS for standard presentation,
  • DOM (Document Object Model) for dynamic and interactive presentation,
  • XML and XSLT for data exchange and manipulation, and
  • XMLHttpRequest for asynchronius data retrieval
In the implementation, not all of them must be used at once. The minimal requirement are XHTML, DOM, and XMLHttpRequest. CSS is used to formating and styling the site presentation, while XML (and XSLT) is used to formatting the data being exchange.

The foundation of Ajax is XMLHttpRequest object. It was first implemented by Microsoft on Internet Explorer 5 as an ActiveX object. Later, Mozilla engineers developed a compatible native version for Mozilla 1.0 (and Netscape 7), followed by Apple on their Safari 1.2 browser.

I haven’t check it myself, but my friend said that Opera browser doesn’t support XMLHttpRequest yet. I’d be grateful if anyone can confirm this for me.

In short, the purpose of this XMLHttpRequest object is to handle data request asynchronously in the background for any web application who need to exchange and manipulate data on-the-fly without reloading the page. In traditional data processing, user submits the data through form, browser sends the data to the server, then server return the output through a new page, so browser need to load that new page in order to display the result to user.

To see what Ajax looks like, just login to your GMail account (if you don’t have one, get it free here :) ), and check your inbox. You’ll see a “Loading” message on the top right of the screen. Then the message disappear, and a list of your inbox message is displayed. All of them happen without reloading the page. Compare the process with Yahoo! Mail or HotMail. Google’s GMail used Ajax, and that’s what you get with Ajax implementation. Cool, huh? :))

On the next page, we will discuss more about XMLHttpRequest object.

Pages: 1 2

Ajax Tutorial - Part I is written by cosa and posted under Article, Programming , , , , . If you like it, you might consider subscribing to our feed or receive our latest posts via email. Or else, you could also bookmark it to your favourite social bookmark sites.

1 Comment (leave yours)

  1. 1

    [...] also wrote several tutorials on May, such as Smarty tutorial (part 1, 2, and 3), and Ajax tutorial (part 1 and [...]

We are pleased to offer you this exciting, new, and entirely free professional resource. Visit our Free Industry resource center today to browse our selection of 600+ complimentary Industry magazines, white papers, webinars, podcasts, and more. Get popular titles including:

Website Magazine
Oracle Magazine
Customer Relationship Management: Secrets to CRM Success

No credit cards, coupons, or promo codes required. Try it today!

Leave a comment