 |
Add AJAX functionality to a website using an AJAX library (Ajax.Net,
Prototype, Microsoft AJAX, etc). This usually involves programming Javascript
but at a higher abstraction level resulting in fewer lines of code than
without a library.
Frequency of use:
medium high
|
|
 |
Most AJAX developers write at abstraction level 2.
Several AJAX Javascript libraries are available and
frequently they are combined to get the desired results.
Microsoft has released its own client-side Javascript library called Microsoft AJAX.
It can be downloaded for free and source code is available.
Interestingly, the Microsoft AJAX library is language agnostic and
supports any web server environment, such as ASP.NET, PHP, ColdFusion, Java, etc.
In this example, the user selects a training class using three cascading dropdowns.
First the course is selected, then the city, and finally the date.
Notice how the selection of one dropdown populates the next one and places focus on it.
The entire selection process takes place without a single page postback
(i.e. no page flicker).
This AJAX-style selection process uses the Microsoft AJAX library.
Following each selection the next dropdown items are
retrieved asynchronously from a web service.
The underlying plumbing of sending SOAP messages to the web service and returning JSON
formatted data to the client is all handled by the library.
The user experience is great because there are no postbacks (i.e. no page flicker).
It also handles backtracking correctly, that is, if the user selects a previous
dropdown, the subsequent dropdowns are cleared and invalidated instantly.
Example: Select a training class
Choose a course:
Choose a city:
Choose a date:
[No class selected yet]
Click here to view the source code.