Search This Blog

Wednesday, March 12, 2008

Ajax and XML: Ajax for Tables

When people think of Ajax and Web 2.0, they mostly remember the visual
elements of the user experience. It's the feel of working in-place,
without the page refresh, that gives Ajax its distinctive appeal. It's
not completely hype: The page refresh of traditional HTML applications
does cause a blink and a reload that even on the fastest connections
presents a visual context change. In this article, the author shows
several techniques -- both with Ajax and without -- that demonstrate
this context change-free approach to user experience design. He starts
with the simplest example of Ajax user experience, the tabbed window.
The article shows a few of the different types of interface elements
that you can build with Ajax, PHP, and the Prototype.js library. Tabs
present the easiest way to put a lot of data in a relatively small
amount of real estate. And the fantastic Prototype.js JavaScript
library makes building Ajax-enabled tabbed windows in Dynamic HTML
(DHTML) easy. The first demonstration of building tables with Ajax
is through the use of an XML request to the server over Ajax. The
value of this technique is two-fold. First, it loads the data on
demand and can be updated in place, which makes for a pleasant user
experience. Second, the technique requires an XML data source, which
is valuable not just for the Ajax code but for any client looking to
consume your data through XML.

No comments: