Ajax vs. Flash

Loose notes from SXSW 2007 panel: Ajax or Flash?

Jonathan Boutelle, SlideShare

New round of religious wars brewing, whether Ajax or Flash is the better choice for interactive web apps, but it’s a false dichotomy. Conversation with someone who’s been in the trenches with both and has built a site that makes use of both technologies in parallel, using the right hammers for the right jobs.

Technorati Tags:



Not either/or, but both/and. All in context of an application Boutelle built called slideshow.net (wanting to become the YouTube of slideshows).

They rewrote big chunks in Flash that had to be re-written in Ajax, and vice versa.

“Good” is a factor of two thing: Good engineering and good user experience. Users: Helping users use as effectively and enjoyably as possible. Speed matters.

Carpenters don’t argue about whether saws or hammers are better. But not simple with decisions like this – not always as obvious which is the right tool. It doesn’t hurt to have both Flash and Ajax running in the same app – in fact it can help.

Final word: Keep Flash on a leash. The web is made of text (gee, I’ve been telling my students this for years – nice to hear this from someone who’s been on the battle lines with both). People can tell when something is running in Flash. Text can’t be copy/pasted. Widgets are non-standard. The user experience is awkward, even with the best designed Flash apps. The SEO story is really bad (since Google can’t see inside Flash). Full screen is a no no. Flash nuggets as best practice. Load time – things don’t tend to load as quickly, and it doesn’t do a good job of chunk-ifying. HTML almost always lighter/faster.

Cheap tricks: In-place editing, attention control, in-page messaging to user, tabs. These things can all be done with DHTML magic (slideshare.net uses both Prototype and Scriptaculous).

From an engineering perspective, you never want to go back to the server when you don’t have to. Keep this in mind up-front – it’s easy to bake this error into your app and it’s tough to get it out.

Flash graphic goodies: Fonts, vector graphics, animation – all things that Flash does much better than Ajax.

Flash multimedia: Way beyond what you can do with Ajax. Output of media, input of media, editing of media. Letting user record audio or video directly into the web page – not possible with Ajax. jumpcut.com – online video editing – amazing use of Flash.

Cool things in Flash – intriguing from an engineering perspective, but hard to find a use for, e.g. Flash sockets – clients can talk to servers, but not vice versa. But who’s using Flash sockets? meebo doesn’t, no one seems to. All are using Comet instead. Local data objects – you can save 100k without asking any permission at all (20x bigger than a cookie). And if you ask the user, you can store as much as you want, which would make your application scream. People tend to delete their cookies, but no one deletes their local data objects – maybe safer (from the web dev’s perspective). Finally, FLEX – very powerful XML declarative language for creating Flash programs. Outputs full-screen applications that look like Win32 apps – but we don’t want that, right? (I’m not sure – see my post on Apollo).

Hiring developers: Tough to find Ajax/Flash crossover artists. Need people who can work comfortably in both technologies without any of the political baggage. It’s hard to find these people – Bouttelle teaches employees both. Get ’em while they’re young, before they’ve been corrupted by the industry to think Flash is evil.

Jakon Nielson: “Flash is 99% bad.” Boutelle thinks Nielson is 99% wrong.

4 Replies to “Ajax vs. Flash”

  1. “… before they’ve been corrupted by the industry to think Flash is evil.”

    But … Flash IS evil!

    You’re locking your content into something that is licensed to you. Macrodobe can change that license and its pricing whenever they see fit.

    They also decide who gets invited to the party. These days, anyone on anything but Windows, OSX, or i386 Linux isn’t invited. And if you want to develop Flash content, well, you’d better be the type of person that will pay for an OS. It’s Windows or Mac only to create content.

    Flash is a neat tool. But if this was paper, and I told you that a special pen could make the writing look really cool, provided

    1). You could afford the pen.

    2). Used a desk Macrodobe approved of.

    3). Were willing to accept that the pen and its ink remained the property of Macrodobe after your purchase.

    4). You knew that a significant number of people could not read the ink.

    you’d laugh me out of the room. And rightly so. Why isn’t that happening here? Why do software developers get breaks the pen and paper industry don’t?

  2. All good arguments, mnep, and part of me agrees. But I’d counter with this: If I needed to write a particular kind of message that couldn’t be written with a normal pen (say I need to deliver a painting rather than a note), but I knew that 1% or 2% of users would not be able to view the special painting, would I simply not deliver that special message at all?

    This is an area where there isn’t an alternative. It’s not like the developer has a choice and can opt for an OSS alternative to Flash, because there isn’t a viable one. The trick is in having enough familiarity with the technologies to know what kinds of things can be done with a more open/compatible DHTML alternative and which kinds of things simply cannot. And there’s a lot that Flash can do that DHTML cannot.

    For many kinds of presentations, it’s not like you have a choice of tools. The only choice you have is to use Flash or not to deliver the message at all.

  3. Coda: For an ironic capper, note that some of the most popular Ajax libraries (Dojo, Scriptaculous) are starting to implement offline storage libraries in Flash (see above for reasons why). So many seemingly “open” Ajax implementations out there are now sitting on top of a transparent Flash layer.

Leave a Reply

Your email address will not be published.