« Junk Mail folder stops working on Mail.app in OS X | Main | Ring my Bel (Geddes) »

February 19, 2005

"Ajax" and the smoove user experience

Jesse James Garrett has a new essay about the user experience impact of client-side Javascript-based techniques like XMLHTTPRequest. It’s quite good, but I wanted to clarify a couple of things:

There is no “Ajax engine” commonly in use that one could download or copy (although JSPAN’s nearly there in the PHP world). Google’s own best examples of this kind of design, Google Suggest and Google Maps, have essentially nothing in common in terms of client-side code. This is clear at the start of Jesse’s article, where he lists the technologies (usually) behind “Ajax” applications, but his diagrams imply the “Ajax engine” is a concrete thing. (Jesse’s diagram also suggests that CSS would be generated via the Ajax engine; I’m not aware of any examples of CSS-on-the-fly like this.)

Jesse implies that the “Ajax web application model” can simply replace the “classic web application model,” although I don’t think that’s his intention. The “classic” approach of one HTTP request returning one web page (in other words, click and the browser loads a page) is certainly still useful. If you’re navigating to a new section of a site, or to a piece of the application where the content on the screen is totally different, there’s no need to route all this through your Javascript; just load a new page. (Gmail and Ta-da lists both do this.) Requests via XMLHTTPRequest aren’t added to the browser’s history—since they don’t result in new pages—so the Back button won’t work. If the change to the page “feels” substantial, or acts like site navigation, you might want to just let the page load normally.

Posted by Andrew at February 19, 2005 09:04 PM

Comments

Requests via XMLHTTPRequest don’t register in the browser’s history, but not all “Ajax” techniques use XMLHTTPRequest. Methods such as JavaScript Remote Scripting use an iframe to grab the data from the server, which seamlessly allows the back button to work if coded properly. A similar technique is used in Google Maps which works beautifully with the back button.

Posted by: Simon King at February 20, 2005 12:26 AM

In my opinion, what is described by Jesse James Garrett as “Ajax”, should be referred to as a client-side technique or as an implementation solution rather than “engine”.

XMLHTTPRequest ActiveX object is not the only way to achieve smoother interaction between human user and web-based graphic user interface (GUI). For the past 4 years I’m successfully implementing very similar technique based on HTML iframe. HTTP request targeting HTML iframe is sent to web server and the returned (X)HTML code is nested into existing HTML div object by it’s ID using JavaScript and InnerHTML property. This solution, based on running “secondary” requests to a web server in hidden from operator eyes inner frame, works on IE6 (and on older versions) and may be adapted to other browsers by generic, HTTP-sniffer-based, JavaScript code adjustment.

Three major goals critical for web-based application are achieved by this technique. First, cutting the initial loading time of the screen by providing web-client only with content essential for usable and basically informative screen lookout. Second, managing limited system infrastructure recourses more efficiently by loading any additional content only on operator’s demand, initiated by interaction with the screen: clicking on icon-like image, selecting an option from the list, pressing a button. And last, but not least, providing a system operator with smooth application-like user experience.

While the “Ajax” solution, implemented by ActiveX object or by HTML iframe, is suitable for local intranet solutions, it may be problematic for use in the internet web-sites. Both, HTML iframe and ActiveX object, have earned themselves a very poor reputation due to related security issues, especially on Microsoft platforms. That’s why a careful surfer may disable those in his or her web-browser security settings, if possible (like in most commonly used IE6). In case of corporation using IE6 the employees may be instructed to add the application IP address to the “Local intranet” web content zone with custom, less restrictive, security settings. Such policy may not be applied on the general public of internet surfers.

Contemporary web browsers are developed and security settings are configured with common internet surfing in mind. Simultaneously, the growing demand for a web-based interface from the corporate policy makers forces web developers to implement “application mock-up” techniques, like “Ajax”. May be in the future there is going to be an accepted standard for online applications and a compliant browsers with embedded client side “secondary request engine”. But even then, mostly due to accessibility issues, this solution will remain corporate-intranet oriented and not suitable for the internet web sites.

Posted by: Boris Rudnik at February 22, 2005 09:12 AM