Section 1.5. Characteristics of Ajax Applications


1.5. Characteristics of Ajax Applications

Earlier 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 Sites

These 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 Interaction

Traditional 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. Live

With 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. Supportive

Ajax 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 Effects

Ajax 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.

Why Web Applications?

So what's the big attraction of web apps? Why, when the desktop seems to be working just fine, are many developers targeting browsers instead? The following describes some of the reasons why people are moving towards the web platform.

  • People are using different computers at home, at work, at school, in cafes, and on their phones. Hosting the data online is the most natural way to take their data and preferences with them.

  • A much greater problem than having too many computers is having none at all. Many people around the world have no computer to install desktop software on and store their data. For them, a web application is the only practical way to use a particular application and safely retain all their data.

  • Desktop applications suffer from something of a catch-22 situation: a user needs to be convinced an application is useful enough to bother installing, but she often can't make that call until she's installed it. In contrast, most web applications allow a user to jump in straight away and immediately begin using the application, avoiding an installation process altogether.

  • Many homes and offices now have broadband, and server hardware is more powerful than ever. The infrastructure makes it possible to deliver the kind of rich, interactive, applications that were envisioned in the 1990s but weren't yet practical. Furthermore, server-side storage is cheap enough for vast amounts of data to be held onlineGmail's initial offering of 1 GB mail storage took the world by surprise, and there are now startups offering to host entire music collections online (e.g., mp3tunes.com).

  • The technologies behind AjaxJavaScript, the DOM, and web remotinghave matured and become more standard. This means web applications can now be made more portable and more usable. In addition, there's a hidden benefit of modern web applications: performance. Compared to the old days of complete page refreshes, smart developers can choose to minimize data transfer with a range of performance optimization techniques. So performance is not only boosted by bandwidth increases, but by the new school of web application architecture.

  • For developers, a modern web application is often more productive than a conventional GUI alternative, especially if you want frequent releases on multiple platforms. Developers only have to code a single product for all platforms; they can upgrade the application incrementally rather than in "big bang" style. And on the server, where most of the logic lives, they can use whatever programming language and libraries they care to work with.

  • Developing rich applications on the Web used to be considered a kind of rocket science. But it's actually a lot easier now to develop for the Webarguably easier than many GUI environments. Several factors have improved the development experience: (a) developers are now comfortable with the web architecture and the various libraries and frameworks around; (b) these libraries and frameworks have improved a great deal, especially since the rise of Ajax; (c) browsers are now more consistent and standards-based, and also offer better support for development such as debugging toolkits.

  • As security concerns have heightened, companies are now quicker to lock down desktops and forbid browser plugins. Web applications hosted on a company's Intranet are often seen as more secure, and support tighter monitoring and access control.

  • Application developers are usually interesting in supporting as wide a user base as possible. Those who just target MS-Windows will not only miss out on other desktop options like Apple and Linux, but also on less conventional platforms like smartphones, home entertainment systems, and game consoles. A web application is often a more flexible way to target these newer platforms.

  • One of the great strengths of the Internet is the ability to communicate and collaborate with remote users. However, doing that relies on common or interoperable software. As web browsers are virtually ubiquitous on Internet-connected computers, web apps are a very attractive option for communication and collaboration.


1.5.6. New Widgets

Ajax 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 Interaction

It'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-Based

Ajax 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.




Ajax Design Patterns
Ajax Design Patterns
ISBN: 0596101805
EAN: 2147483647
Year: 2007
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net