Thursday, December 15th, 2005

What Ajax _Can’t_ Do

Category: Accessibility, Ajax, Editorial, Usability

<p>Fellow Ajaxian Michael Mahemoff posted on something not discussed enough – what Ajax can’t do:

  • Browser morphing Adding buttons, toolbars, bookmarks, icons; changing browser behaviour.
  • Local file access Reading and writing files on the user’s hard drive.
  • Sound Playing music and sound effects.
  • Rich graphics Providing rich graphics, changing dynamically. (This is gradually changing with the introduction of SVG in some browsers, but it’s no match for desktop graphics.)
  • Keyboard shortcuts Providing a full range of keyboard shortcuts while avoiding conflicts with the browser’s own keyboard shortcuts.
  • Hardware access Input from devices such as microphones, webcams, and gamepads; output to devices like printers and portable gadgets.
  • Extended communication Communication from the client machine to locations beyond just the base server, and in protcols other than plain old HTTP.
  • Operating system interaction Catching events such as shutdown initiation; changing preferences; popping up alerts; reading hardware information.

Of course, we’ve seen a bunch of possible solutions to the local storage issue. I fear we won’t have a reliable, non-hack solution unless the IE team and Mozilla team can just meet and agree on it. The limitation in changing browser behavior and shortcut keys is also an advantage in some ways, as it keeps everything nice and standard between apps.

What other things can’t (or shouldn’t) ajax do?

Related Content:

  • Reverse Ajax revealed
    Jason Bloomberg explains the definition of reverse Ajax and whether it will stand the test of...
  • Ajax hype vs. reality
    Ajax is a powerful rich Internet application technology, but Burton Group cautions against overkill and notes that tools and frameworks for using it...
  • Ajax hype vs. reality
    Ajax is a powerful rich Internet application technology, but Burton Group cautions against overkill and notes that tools and frameworks for using it...
  • Ajax hype vs. reality
    Ajax is a powerful rich Internet application technology, but Burton Group cautions against overkill and notes that tools and frameworks for using it...
  • Ajax after the hype
    Yes, there was exuberance when Ajax burst on the scene in 2005, but by now it appears that the hype was justified by the benefits of the technology,...

Posted by Rob Sanheim at 10:28 am
22 Comments

+++--
3.6 rating from 28 votes

22 Comments »

Comments feed

Ajax can’t do lots of things. In fact, it only does one or two things, depending upon your callingdefinition of Ajax.

A shortcoming of this “Ajax Mission” is the desire to conflate all things Ajax and DHTML. Now I know Ajax is all the rage, but Ajax is really just one or two lines of code getting new data from the server between page loads. That’s it; finito.

Everything else is DOM and JavaScript, a blend of technologies which are obviously not new. And 95% of the complexity of developing “Ajax” apps is in fact plain old DHTML complexity. Same as it ever was.

I respect this blog and the great research done to ferret out new ideas in the client-side world. But the desire to call everything Ajax is hurting its credibility.

Comment by Patrick Corcoran — December 15, 2005

wrong its possible to play sound with javascript and its possible to acces local files ( cookies… ) also keyboard shortcuts are possible
for direct hardware access and os interaction .. i am quite happy that javascript cant interact with this

regards

Comment by Ronny Stiftel — December 15, 2005

The sound limitation I definitely think you can get around. This website has example of embedding sound files and controlling with Javascript, http://www.webreference.com/js/column20/index.html. You could also use AFLAX, a Javascript library for dynamically controlling flash, and use its sound function to play sound or even video.

Comment by Cory — December 15, 2005

I was thinking about it and you could also use tag for rich graphics or AFLAX again to control flash through Javascript. Now I’m not a flash guy or really experienced with AFLAX but know there is an option for flash to take control of a webcam (if present) and mic. Now I imagine flash gives those options because flash offers the ability to take input from them. This functionality might be accessible through AFLAX too, not sure though.

Comment by Cory Rauch — December 15, 2005

Yup, nothing you can’t do more efficiently by returning JavaScript from the server instead of XML. AJAX just has XML and is therefore buzzword-complaiant. Whoop-dee-freakin’-doo.

IMO DHTML actually is amazing and revolutionary; as Ronny Stiftel said, AJAX doesn’t really add anything new (except bloat).

Comment by Nick Grossman — December 15, 2005

Ronny Stiftel wrote:
> “its possible to play sound with javascript”

I know that you can do rudimentary things like pop a sound file into an iframe, which will play once it finishes loading, but as far as I know that’s about as sophisticated as it gets. Do you know of better techniques (not counting Flash)? Please share! :-)

Cory wrote:
> http://www.webreference.com/js/column20/index.html

That technique is ancient. IE no longer supports Netscape-style plugins. I assume we’re talking about a modern technique that’s cross-platform/browser compatible.

(BTW, comment preview doesn’t display line breaks!)

Comment by MH — December 15, 2005

Totaly agree with Patrick Corcoran, this post was among the worst posted here. Also, consider what Ajax stands for, it’s not meant that Javascript should do those stuff in the list. Aspecially not interact with the OS…don’t you think there is enough virus out there?

The only thing worst than the post is some of the comments here, the commentators should re-read Patrick’s comment.

Comment by Hakan Bilgin — December 15, 2005

To Patrick and Hakan,

Grow up.

The term “Ajax” is about as meaningful as “Web 2.0″. It’s just term for “anything cool you can do with a browser”. There’s really no point in flaming people who don’t use “Ajax” in the extreme literal sense because the only reason the term is so popular is because people associate it with cool, modern web apps.

You’re only hurting your own credibility by acting like such a juvenile, tight-ass.

Comment by Anon — December 15, 2005

Better rename the site “DOMJavascriptian.com” before people get too offended…

Comment by MH — December 15, 2005

Thanks for all the feedback. Here’s a few clarifications:

* First, everyone’s entitled to their own definition of Ajax. Personally, I’ve found the working definition that’s most useful for developers and customers is something along the lines of James Jesse Garrett’s statement, transcribed here”.
* The original post was about the Richer Plugin pattern; it’s about saying what can be done with standard technologies and what requires a Flash/Java/etc plugin (e.g. local file storage). When I say “what Ajax can’t do”, please substitute “what standard web browsers can’t do” if it eliminates any confusion.
* It’s true there are some things you wouldn’t generally want Ajax to do. But again, part of the point of Richer Plugin is to let a user decide that a certain website is worthy of extra permissions. Especially important on intranets, where the browser is useful for many things, but also imposes some frustrating limitations.

Comment by Michael Mahemoff — December 15, 2005

Thanks for all the comments!

A relevant note from Garrett’s original article:

“…XMLHttpRequest is only part of the Ajax equation. XMLHttpRequest is the technical component that makes the asynchronous server communication possible; Ajax is our name for the overall approach described in the article, which relies not only on XMLHttpRequest, but on CSS, DOM, and other technologies.”

Comment by Rob Sanheim — December 15, 2005

I’m sorry, but I have to agree with some of the comments above. AJAX was a bad buzzword to start with, now it’s being used for more than it’s supposed to cover. It’s like saying an ATM is part of the FTSE. Sure they’re both to do with money, but they’re completely different.

Hakan, you say the term “AJAX” is the same as “Web 2.0″, I agree. Let’s ditch both, they’re meaningless and can be described better using existing terms.

Soon people will be trying to tell me my firefox theme is “AJAX” because it’s a “cool new browser feature”. Let it go guys, really, let it go.

In my experience in the industry, the amount people use the term “AJAX” is inversely proportional to their ability in terms of web development. Fact.

Comment by Jaffa The Cake — December 15, 2005

From post:

“Sound Playing music and sound effects.”

In reading this post it seemed (to me anyway) that all that was implied was playing sound files. You are right you can not do any advanced sound manipulation or sound hardware interaction.

Comment by Cory — December 15, 2005

I want to back some of the “conerned” people above. AJAX is overused right now. Due to the name of this site Ajaxian has the right to wirte often about AJAX, but please be a bit more cautious what is essentially a AJAX feature and what is a DOM+CSS feature. Why you ask? It helps th reader of this blog. If you wirte about a cool new AJAX feature them I’m searching for the bit with the server interaction, so I can judge if I can use it in my server installation too.
If you write about some cutting edge DHTML/DOM I know that what you are writing about something that only concerns the client and I can use it with any cheap hosted php package.
And if there is a lot of AJAX and cutting edge DOM just use the (nice) buzzword Web2.0 then I know that it spans from the server (maybe Spring or ROR) to the modern browser and if I use it I should at least control over the server (with admin access).

I recently thought about the buzzword web2.0 and I came up with this definition: “web2.0 describes the fact that browser which were really bad at standard compliance like netscape4, netscape6, IE4, and IE5 died out and we are finally able to uses DOM+Javascript+CSS as intended plus a bid of none-standard asynchronous Client Server Interactions.

The creadit should go to “standard compliant browser” and not to AJAX. Yes the credit goes to mighty Microsoft and the nice guys at Mozilla who force Microsoft to have at least a look at standards.

Also most AJAX-application presented here would be not much worth without some intelligent data that come from a server, so please be nice to the server guys.

Comment by philippj — December 15, 2005

It can’t dirve a car, and can’t fetch me a drink! I’m a bit surprised by the lofty title of this post, because Ajax (replace with whatever, if you prefer) is just a tool in a bag of tools. Why should it do everything?

Comment by Subbu Allamaraju — December 15, 2005

Subbu,

The original post was really just another way of asking, “When do you need to use a richer plugin?”.

BTW The point of the post was not to say “Ajax should do everything under the sun” or that browsers should add new capabilities to accept gamepad input. It’s about working out the limits of standard web technology and deciding when it makes sense to augment it with Flash etc.

I think it’s pretty nice that you can have an Ajax app like Odeo that uses a “Richer Plugin”, ie Flash, to play and record podcasts without requiring any download. The idea of local storage is also proving to be popular.

The link in my comment above didn’t work – it’s http://www.softwareas.com/ajax-not-ajax-a-user-centered-definition, which includes Jesse-James Garret’s take on the Ajax definition, FWIW:
“In my opinion, Ajax refers simply to using browser-native technologies, open standard technologies, in ways that depart from the traditional interaction model of the web – the kind of call-and-response interaction model where every user action is tied to some kind of server communication, and while that server communication is going on, no user actions can take place. Any time you’re decoupling the flow of user interaction with the application from the flow of server communication, and you’re doing that with browser-native standard technologies, I think that’s Ajax.â€?

Comment by Michael Mahemoff — December 15, 2005

Don’t forget that by combining Ajax and the canvas tag (in Safari and Firefox), it *is* possible to create graphics that change dynamically!

Comment by Dave Hoover — December 15, 2005

The only thing missing with Ajax is common understanding of the platform, and the lack of common sense within the community.

Ajax as a replacement for operating system tasks is just silly, and one of the real examples of uninformed hyping. Using Ajax as a tool to dramatically enhance user interfaces for the web is a different thing, and this is what Ajax has been developed for.

I don’t think Ajax misses anything, browser support misses somethings. Enhanced native controls (upload with size and progress detection,spinbox,etc.), unified drag and drop, garbage collector enhancements.

I did not mention the total lack of a good Javascript editor in the first place. The eclipse based editor is outdated and very very alpha.

Comment by Micha — December 16, 2005

You may have a look at the Web API working group from the W3C about recommendations of Ajax:

http://www.w3.org/2006/webapi/

This could clarify what Ajax should do and how it should do it.

Comment by Symvain — December 16, 2005

Ben/Dion – thank you for taking the time to keep this site going. I have found it educational. Not having a computer science degree (electrical engineering & industrial engineering), I find the site useful and at times beyond me. That’s great as it has given me something to strive for.

I agree with other that Ajax is at this point over used but it is *a* tool in the programmer’s toolbox – as is this site. This site, like Ajax itself, isn’t intended to cover everything and its up to each of us to decide how relevant the tool/site is for what we do.

I’m personally excited to learn more about Ajax (what it is & how to apply it) as well as other technologies out there like RoR, prototype and the like.

To me, the Web is like a fabric and it’s technologies are the needles and threads we developers use to create rich patterns in that cloth.

Thanks again to the sponsors of the site and the others who post here as it definitely helps me learn about the world in which I live.

Comment by Jordan — December 16, 2005

Like any other overhyped technology there are always people that get way too excited about it and want to jump on the “this is the greatest thing ever” bandwagon. Sure, Ajax is exciting and from the little I have toyed around with it, I can definitely see where I would like to use it in some places to make the web a little more dynamic for the user but I’m not going to start adding it everywhere just because I can. That’s the problem. People get excited about something like ajax and start implementing it everywhere without actually pausing to think about whether there is any benefit for the user.

Comment by Darrell — December 30, 2005

http://weblogs.asp.net/scottgu/archive/2005/06/28/416185.aspx

Local file access is a fairly good issue. While I would not want to just provide blanket access to the file system, some mechanism along the lines of “isolated storage” would be great. In scott’s post, which I reference above, he mentions some client side building blocks for file storage. Since the post last June, I have had some more discussion with the PM in charge of Atlas. They are attempting to create some type of delivery vehicle and work with other browser makers to support this. I don’t know where that has gone as I haven’t talked to them on the subject since early October. I’ve been too busy writing my on “AJAJX with ASP.NET” book.

Comment by Wallym — January 4, 2006

Leave a comment

You must be logged in to post a comment.