Enrich the Web experience

Technologies like Java and Flash have been used to give Web applications more of a "rich client" look and feel for many years now. However, today two standards-based technologies - Ajax and XUL - are giving developers the ability to jazz up the user experience, without the need for third-party add-ons.

Polishing sites with Ajax

Asynchronous JavaScript and XML, or Ajax, is the latest buzzword used to describe a technique that combines Web development technologies like HTML, CSS, Javascript, and XML to improve the overall user experience. Instead of needing to continuously reload a Web site to retrieve updated information, Ajax allows requests to the server to be processed in the background and the results displayed in sections of the page. A good example of Ajax in action is Google Maps (http://maps.google.com) where areas outside the displayed map are pre-loaded allowing the user to click and drag to a surrounding map without reloading the page.

Kevin Yank, technical director of Melbourne-based Web development firm SitePoint, said although Ajax had been "brewing for awhile", its recent surge to the forefront is just a convergence of interest in several technologies that have been heavily hyped but fell short of their promise in some areas.

"On the one hand, you've got XML Web Services, which is making a big impression in enterprise work, but only limited inroads in mainstream Web development," Yank said. "On the other hand, you've got a number of platforms for building Web applications with rich interfaces: be it Flash from Macromedia, XML User Interface Language (XUL) from Mozilla, or Microsoft's Extensible Application Markup Language (XAML). While all these options have exciting capabilities, they all suffer from some form of 'lock-in'; be it the development tools you are forced to buy, or the browsers you are able to support."

Yank said Ajax takes a lot of the good ideas that went into these technologies and scales them back to a level that is approachable to mainstream developers and free of cost and lock-in.

Yank said Ajax is easier to apply to an existing Web site than other options because it integrates with standard Web user interfaces built with HTML, CSS, and JavaScript. "With Java and Flash, you have to set aside a rectangular area of the page to expose the rich user interface in amongst whatever else you've got going on. And whether you go out of your way to make that box look like a natural part of the page, or you replace your entire page with that rich interface, achieving true consistency in the user experience means a lot of work," he said. "Ajax, on the other hand, can be hidden discretely behind the scenes, and can add interactivity and responsiveness to your existing HTML user interface with minimal impact on the page design."

When asked about the benefits of using Ajax to breathe new life into existing business applications, Yank said Ajax can transform a Web page from a "passive receptacle" for user requests into a "helpful participant" that works alongside the user to get things done.

"As a user fills out a form, Ajax requests can run in the background to producing assistance, suggestions, or on-the-fly responses in return," he said. "Ajax can also reduce the time a user has to wait for a response, as the browser can fetch only the response itself from the Web server, rather than a whole new Web page to display that response."

That said, Yank believes the practical benefits of Ajax are still being explored, and is "sure there are some big surprises still to come".

"In general, Ajax will help transform the average Web page from an isolated fragment of dialogue between the user and the application into an adaptive workspace that helps the user achieve a particular task," he said. "Ajax offers a virtual panacea when it comes to many of the usability ills on the Web today. With Ajax, Web pages can respond immediately to user input, providing much-needed feedback without interfering with additional input. Ajax can also be used to load and provide help for user interface elements as needed, clarifying what can be achieved without bogging down the page by loading it all up front."

Furthermore, when asked whether developers in the business community will look seriously at Ajax and realize its benefits, Yank said Google is definitely leading by example, and will be followed by leaders in e-business like Amazon.com and eBay. "Smaller online businesses will no doubt follow suit, although I'd expect some of the nimbler, more forward-looking of these to trump the big boys with early offerings," he said.

"Businesses whose Web offerings are not their primary focus will be much slower to embrace the possibilities of Ajax.

"Banks, for example, are notorious for dragging their feet when it comes to embracing Web standards, favouring a conservative approach that clings to outdated practices because of the investment required to ensure the security of emerging best practices."

In terms of how 'rich' Ajax-based applications can become, Yank said it depends on the display capabilities of modern browsers than on Ajax itself.

"Ajax is merely the medium for making 'behind the scenes' requests from the browser to the server," he said. "When those requests are made and what happens when the server responds to them is where 'richness' such as dynamic changes to the page, animations, and multimedia come from.

"This is what's fuelling the new wave of interest in Dynamic HTML, which goes hand-in-hand with Ajax in building rich Web applications like Google Maps."

Ajax may still be in the experimental category when it comes to best practices, but, according to Yank, designers are now starting to ask the hard questions.

"What's the best way to integrate Ajax into the code of a Web site? How do you provide the enhanced functionality and usability that Ajax makes possible without making fatal sacrifices in accessibility? How do you synchronize the functionality that you offer through client-side JavaScript code running in the browser with the server-side logic of your application?"

AjaxAC: extending Ajax with PHP

In a sign that Web development firms are looking to accelerate Ajax use, Adelaide-based Zervaas Enterprises last month released AjaxAC - an open-source framework written in PHP for generating Ajax applications.

The brainchild of CEO Quentin Zervaas, AjaxAC is designed to deal with the potential drawbacks of Ajax, such as scalability, accessibility and cross-browser compatibility.

"It provides a standard API for building Ajax applications using PHP," Zervaas said. "So in reality this does two things: generates application JavaScript code, and handles user actions that require some kind of response or processing by the server."

Zervaas is hopeful that with the popularity of PHP, AjaxAC can play a significant role in getting more developers involved in Ajax development, and therefore increasing its exposure and capabilities.

Zervaas said it's up to developers to get a firm grasp of the technology to make it affordable in business.

"The biggest deterrent will be the extra development time in ensuring cross-browser compatibility, as well as providing non-JavaScript compatibility," he said.

"There's any number of ways using Ajax can improve Web applications - it really depends on the imagination of the interface designer or Web developer.

"Take a CMS (content management system) or example. Most CMSs will allow storing of files for download on your Web site. Using Ajax, you could write an interface to make the file manager run like Windows Explorer. So when uploading a file, you could display a status bar with the upload progress, or when creating a new folder have the folder tree update dynamically without refreshing the entire page."

Extending the browser with XUL

XML User Interface Language, or XUL (pronounced "zool"), is an XML-based markup language that Netscape and Mozilla browser development spawned. Like Ajax, XUL brings together a number of Web standards to create a richer experience but with the key difference of being able to extend the functionality of Mozilla applications like the Firefox browser and Thunderbird e-mail client.

Although XUL is 'tied' to Mozilla applications, the Firefox Web browser is free, cross-platform, and open source so XUL browser extensions are not exactly 'locking' end users into a proprietary product.

Andrew Mitchell, Sydney information site iliveinsydney.com's developer, wrote a Firefox extension in XUL to monitor the city's water crisis, but said the method can be used for many different types of business applications.

"A XUL browser extension could be used to feed a small display in the browser window of some information that the user wishes to keep track of, or modify the browser's behaviour," Mitchell said, adding that a bank could provide a XUL application to help customers keep track of home finance, accounting, and budgeting in a nice, graphical way.

"I think a good example of a browser extension that can jazz up business is the netusage extension," he said. "This extension - which works for many ISPs in Australia - is designed to help people whose ISPs have data limits. It continually shows the user's ISP usage data, remaining data, and the like, in an informative graphical way."

Mitchell said the use of XUL generally gives the customer much more satisfaction using a Web site as it "vastly" reduces time that customers spend waiting for something to happen.

"I feel that the most annoying time spent waiting as an Internet user is all those small waits of a second or two while going from one page of a form to the next," he said. "In my opinion it is primarily this that keeps everyone from switching completely over to, for example, Web based e-mail rather than local e-mail applications."

Mitchell conceded browser extensions are more difficult for the user to install as they require the use of an appropriate Web browser, go through an installation process, trust the provider of the extension, and generally restart their browser. Whereas a Web site using Java and Flash "just works for most people".

"As a result, browser extensions tend to be applications which work across multiple Web sites or display some information continually or immediately on request," Mitchell said.

"I think, at the moment, the greatest restrictions to using XUL browser extensions are the limited user base and difficulty of installation. Certainly some larger ISPs or companies with a large number of Internet based customers may make use of XUL's benefits at some stage."

Andrew Mitchell's firefox extension is based on netusage and can be downloaded from http://www.iliveinsydney.com/water/firefox/

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

More about Amazon.comCMSeBayGoogleMacromediaMicrosoftPromiseSitePoint

Show Comments