Really Basic AJAX
By Bill Welense
IM 332 at DePaul University
What is AJAX?
Date and time
Drag and drop
What is 'Asynchronous'?
Content on the user's screen can be modified without
refreshing the screen
Data from a program (a
) can be displayed on
the user's screen without navigating away from the current
Can be effectively used to manipulate HTML and CSS
Similar to Java only in that it's programming syntax is the
Does not require a run-time environment such as Flash or
What is XML?
XML stands for E
XML's purpose is to provide a simple way to transfer
information from one application to another
It is similar to HTML, but the tags are dependent on your
The W3C does have specifications for how XML should be
formatted, used, etc.
How to use AJAX
Browser support can be finicky
ActiveX control is used for Internet Explorer
DOM (Document Object Model) is used to W3C-compliant
browsers (Firefox, Safari, Opera, etc.)
To start from scratch, AJAX requires quite a bit of
programming just to get started
Best to use a free library, such as JQurey of Prototype
These libraries can easily handle remote data provided
throughXML web services
What is a Web Service?
Very basic definition: A program that generates an XML file
containing requested information
Supplies raw data, rather than data formatted for display
on a screen
Data can be manipulated by another application (such as
an AJAX-based web application)
Data can be re-used for many different applications
What is JQuery?
A comprehensive AJAX library
Lets you write less code
Has a very simple API (Application Programming Interface)
Rather than causing an error, the JQuery library is
Code is then processed through JQuery
Can easily locate and modify elements in an HTML
document by the 'id' or 'class' values
Web Service Example