1.5. Characteristics of Ajax ApplicationsEarlier on, Ajax was defined as a technology that "builds on standard web technologies to deliver a rich, responsive, user experience." This shouldn't be seen as a binary thing, because it's useful to think of Ajax as a continuous spectruman application that happens to include a Flash widget, or one that avoids using any remoting technology can still be considered "partly" Ajaxian; it's useful to do so if you're designing that system as you can leverage the experience of other Ajax developers, which is the kind of experience encapsulated in the Ajax Patterns. And in documenting the Ajax Patterns, it's certainly useful to learn from applications that aren't "pure Ajax." To that end, the characteristics here are intended as a general guide, but not hard-and-fast rules, for what constitutes an Ajax application. 1.5.1. Applications, Not Just Web SitesThese days, you'll hear a lot more about "web applications"or "webapps"than about "web sites." Driving many modern web projects is the perspective of the browser as a platform and the Web as an operating system. People aren't just buying a book or browsing a manual, but are performing day-to-day work as well as socializing via the browser platform, often working on more critical, complex tasks than in the past. While Ajax can really be applied to anything running inside a browser, it comes into its own with these kinds of systems, where it helps keeps users engaged and productive. 1.5.2. Smooth, Continuous InteractionTraditional web sites make you submit a form, wait a few seconds, watch the page redraw, and then start the whole cycle again. That's because the tiniest server interaction, and even the tiniest display change, requires a call to the server, and then a complete page refresh. It's a frustratingly slow and erratic sequence. Ajax changes the model in a few ways. First, JavaScript running inside the browser can manipulate the display directlyyou don't have to send a whole new page from the server in order to hide an element or rearrange the page. Second, server interaction can be handled via JavaScript, so you can upload user commands and download new information without any page refresh. Third, user actions such as mouse-clicking and typing can be handled by JavaScript, so the interaction is a lot richer than just filling in a form and hitting Submit. All of these enhancements make Ajax interaction feel faster and more continuous. 1.5.3. LiveWith browser-server interaction no longer a major ritual, it's possible to continuously poll the server for new information. Thus, an Ajax App can be programmed to always show the latest news, details on who else is online, or to send messages to the user. The content is "live." 1.5.4. SupportiveAjax Apps can monitor user actions and proactively support whatever task the user's working on. Actions as small as a single keystroke can lead to a server call, where the server's knowledge and processing power can be harnessed to produce useful content a subsecond later. For example, a form might change according to the user's input, or an error message might appear as soon as a value is typed. 1.5.5. Visual EffectsAjax Apps look similar to conventional web apps, but do tend to include a little more animation. Not the kind of flashy animation that's just there for the sake of it, but animation that gets across a message about what's happening and what the user can do next. For example, a deleted icon might slowly shrink and disappear.
1.5.6. New WidgetsAjax widgets go beyond the standard HTML controlstext fields, selectors, buttons, and so on. Widgets such as sliders and progress indicators, built on standard HTML elements, are becoming popular. As well, we're seeing conventional widgets enhanced. Instead of a boring old table, you might see a searchable, editable data grid. In place of a textarea element, you might see a rich text editor with "What-You-See-Is-What-You-Get" qualities similar to most word processors. 1.5.7. New Styles of InteractionIt's not only widgets that are getting an upgrade, but styles of interaction. Here, too, Ajax developers have been borrowing from concepts in traditional desktop environments. Drag-and-drop, for example, has been a staple feature of windowing environments for two decades, but somehow didn't made it onto the Web for a long, long time. Now we're seeing it more and more, and it all makes so much sense, as the earlier portal example illustrated. Other styles of interaction are also becoming more popular. Keyboard shortcuts are being used to streamline activity. And some developers are being a bit more adventurous with mouse buttons, experimenting with double-clicking as well as the right and middle buttons. We're yet to see mouse gestures like those available in the Opera browser and other programs, but anything's possible. 1.5.8. Standards-BasedAjax applications require nothing more than a standard web browser from the past few years, such as Internet Explorer 6 or Firefox 1.0. While the precise browser coverage depends on your objectives, the point is that Ajax makes the most of standard browser features and avoids browser-specific features and plugins where possible. This means more than standard technologies; it's also about respecting standard user-interface conventions of the Web. |