躺在沙滩上的小猪

快乐的每一天

[ZT]What's Wrong With Ajax?

http://www.aventureforth.com/2005/09/21/whats-wrong-with-ajax/

Interest in Ajax continues to increase, which is somewhat surprising considering that its constituent components have been around for 5+ years. In fact, Microsoft was one of the earliest to adopt Ajax (they used XMLHTTP in an earlier version of Outlook Web Access). Google, however, popularized the development technique by launching Maps, Gmail, and Suggest (hopefully, Microsoft has a big budget for extra chairs).

I’ve been captivated by Ajax, too. When well-implemented, Ajax-powered applications are undeniably impressive (see here); they seem to run fast, they look good, and no plug-ins are required.

However, there are at least three noteworthy problems with the use of Ajax in web application development.

First, Ajax introduces potential user interface issues. In particular, poorly designed Ajax applications work in ways that aren’t intuitive for the average user. For example:

  • The back, stop, and refresh buttons don’t always work.
  • Since Ajax applications generate pages dynamically, there generally aren’t static links available for bookmarking or sharing with others.
  • Pages don’t always print well.
  • Applications don’t run offline.
  • Clicks and actions generally don’t get included into a browser’s history table.

For more detail, see Adam and Alex Bosworth’s posts here and here. In any case, well-written Ajax applications minimize UI problems by providing meaningful visual feedback to users. Also, it’s worth noting that there are emerging solutions (often crude) to some of the above problems.

Second, Ajax requires JavaScript and, for Microsoft’s Internet Explorer, ActiveX must be enabled (though there is a workaround). I think this is a manageable issue as most browsers are sufficiently up to date–though some companies and individuals have disabled JavaScript or ActiveX by default for security or privacy related reasons (see here and here). The key is to design applications to degrade gracefully (which is a fancy way of saying that web pages should work for new and old browsers, even if the old browsers don’t support certain new capabilities). Interestingly, Google fails in this regard. Try running Google Maps with JavaScript disabled. It won’t work (they could have produced a Flash-version like this one here–in some ways, it’s better than the original).

Third, Ajax developers need to be especially mindful of perceived application performance. The goal, obviously, is to make applications seem fast. One way to make that happen is to preload data as an application starts; then, when a user clicks, there can be an instant response. However, it’s sometimes impossible to preload an entire dataset (think about the vast amount of data in Google Maps), so developers need to make smart design decisions about what data users will most likely want. A related issue is network latency, or the time between a user’s click and the system’s eventual response. If the wrong data was preloaded, there should be a visual cue indicating that the user may have to wait until the right data is collected from wherever it is stored.

Of course, some of these problems aren’t unique to Ajax-enabled applications. However, that doesn’t mean the issues aren’t real. Where some see problems, though, others see opportunity. For example, there is a market for new development platforms for quickly and cost-effectively writing, debugging, and managing complex, enterprise-scale applications. Also, there is a need for better browser standards, so that applications work consistently across different platforms.

My sense is that we’re just seeing the tip of the iceberg when it comes to browser-based applications–there are many more on the way, and we’ll be increasingly amazed with what can be done. To that point, we’ve recently invested in a very intriguing company in this area. I’ll blog about them when I can. Also, I’m always interested in learning about new startups, so email me if you have ideas.


http://www.ajaxian.com/archives/2005/09/whats_wrong_wit.html

Dan Grossman, the VC that brought us Top 10 Ajax Apps, has now told us what is wrong with Ajax.

He has brought out the old chestnuts:

First Problem: User Interface Issues

  • The back, stop, and refresh buttons don't always work.
  • Since Ajax applications generate pages dynamically, there generally aren't static links available for bookmarking or sharing with others.
  • Pages don't always print well.
  • Applications don't run offline.
  • Clicks and actions generally don't get included into a browser's history table.

We need to be aware of issues like this, but we have fixes for many of these already, and more are coming.

Second Problem: Ajax requiring JavaScript and ActiveX on IE

Sure, sure. Is that such a huge issue these days? And IE 7 will have native support for XHR at least.

If we keep coming up with quality Ajax applications, then that will be the reason to have JavaScript turned on!

Third Problem: perceived application performance

It is easy to make something slow, or seem slow. However, you only need to play with Yahoo! Mail beta to see how a fully functional app runs like a charm. So, we can do it, and it will only get better for us!

There are definitely issues, and there are MANY things that we all wish we had. But, none of these should scare us.

It is interesting to read Desktop Ajax as Desktop.com Returned where Paul says:

What I really want from Ajax apps is for them to do stuff that it's too hard to do with binary apps. I want them to be sensibly integrated with online resources; I want them to support realtime collaboration. I want them to do different stuff from Word/Excel/Powerpoint, not just do the same thing with a different engine under the hood.

We need to find our way with Ajax applications. Let's not just port over to the web way, with a poorer version due to the limitations. Rather we need to embrace the differences and do as Paul says. Do things that suit the web better.

posted on 2005-09-29 09:38 martin xus 阅读(224) 评论(0)  编辑  收藏 所属分类: other