Flash is Ajax, or Flash versus Ajax, at the Ajax Summit

One of the more interesting debates at the Ajax Summit this week concerned Flash and its relationship to or inclusion in Ajax. The discussion was more interesting because of the Flash demo that Kevin Lynch (CTO of Macromedia, the makers of Flash) gave on the first day — and maybe also simply because he was there at the table.

Kevin’s demo showed a Flash graphing application interacting with JavaScript on a web page — both while initially loading and later, after receiving input from the user on the page (outside of the Flash movie). (Kevin later wrote up some of the details of this.) Cool example.

Flash continued to come up around the edges of the discussion, sometimes getting knocked a bit (Eric Costello of Flickr mentioned that they were moving away from Flash for showing photos, except when rotating photos (to show you what the rotated image would look like — not possible, apparently, in JavaScript), sometimes praised or used as a good example of interface possibilities (by Kevin and others). I noticed that when I did some garden-tending on the summit wiki, and put “Flash” on a page called “Companies Behind or Against Ajax” (along with Microsoft, Google, etc.), Kevin moved it to a different page called “Related Technologies” — and that pretty well summed up his stance, I thought: Flash is a technology that is really useful for Ajax applications; don’t think about Macromedia as a company, particularly, but of Flash as a tool. At one point Flash’s commercial nature came up when some participants asked Kevin to open source the Flash compiler, but in general that line of thought wasn’t strongly advocated in the discussion. Had you not known before coming that Flash is a commercial product, you would not have noticed from the conversation at the summit. Overall I thought Kevin was an excellent advocate for his company and its products’ relationship to a new technology trend, which is not an easy job to take on.

When the demos ended and we started to talk about the question of outcomes for the meeting, the group seemed to share Kevin’s stance on Flash and Ajax, at least to start. “Flash is Ajax” was the top bullet on the outcomes page. I’m sure a bit of this was in deference to Kevin, who after all was sitting right there, but I also think that people were very impressed by Kevin’s demo. David Heinemeier Hansson of 37signals and Ruby on Rails fame said something like, I never thought I would use Flash, but after seeing that demo, if that’s what Flash is, I’m interested in it.

Jesse James Garrett, who coined the term Ajax, took a different stance, though, and soon the bullet on the outcomes page changed to read, “Is Flash Ajax?” What is served, Jesse asked, by saying that we’re seeing a new and interesting way of making web applications, but then saying that a technology that’s been around for a decade is exactly the same thing? Jesse’s comments seemed to ignite some dormant fuel in the crowd, and soon we were going back and forth about whether Flash was really a lightweight tool for highly responsive web apps, or was instead a heavyweight tool not suited to “true” Ajax apps. When the moderators finally cut off the discussion so as not to crowd out other topics, Eric Costello complained, “Okay, but the next topic had better be as good as this one!”

This debate is just the sort of rat-hole large groups of geeks love to spelunk. Who really cares whether Flash is Ajax or not? The page will work just as well if we call it Ajax as it will if we don’t. I do think, though, that the move towards Ajax web applications will crowd out some uses of Flash — were I in Kevin’s shoes, I would view Ajax as a competitor, one that I’d want to co-opt.

For a few years after Java’s announcement in 1995, “dynamic” web applications usually found a home in Java applets — not that there were so many such applications overall, but where they did exist, Java was often the platform of choice. In the past five years, though, Flash gained popularity as a way of embedding dynamic elements within a web application, and compared to Java, it was a much-improved experience (faster load times, wider platform support, and much more consistency across platforms). Of course, we still haven’t seen a great desktop-style app in Flash, and I suspect that at this point we won’t. (I have to wonder, in fact — is Flickr the most-used application ever in Flash, apart from animated ads or standalone movies such as those from JibJab?)

The Ajax model makes Flash (and Java, and ActiveX) unnecessary for some kinds of interface models. When I first wanted to make, say, a dynamically updating table, Java was the only choice; later, Flash was a much more pleasing choice. Now, Ajax/JavaScript offers a number of advantages over Flash: faster load time, consistent interface with the rest of the browser, a standard/free HTTP server backend, and broader development tool support. These advantages and others must be significant — Google Maps could have been done years ago in Flash, but for whatever reason it wasn’t. What I think will happen is that Ajax will be a “worse is better” solution compared to Flash — that is, it will cover most of the functionality most of the people would want from Flash, and do it messier but easier. Why would I ever do a dynamic table in Flash now?

As I say, Flash has blossomed in other niches, particularly in the worlds of advertising and rich media. The advertising niche is unfortunate for Flash, since tools like FlashBlock remove Flash from pages in order to get rid of annoying ads. On the other hand, Evan Williams made the counterpoint while demoing Odeo — how would you make a Podcasting application in JavaScript? You wouldn’t, so they’ve used Flash in their development. Eric from Flickr also talked about how easy it was to deploy across platforms with Flash, and how hard it has been to get cross-platform support right for the same features in JavaScript.

Kevin is right to try to position Flash as a useful extension tool for Ajax applications, and there are definitely times where that model will be very useful. I’m glad he was at the summit and advocating for his technology; I think the discussion would have been one-sided otherwise. In the long run, though, I think the rise of Ajax will cause Flash to specialize in media more and more. The JibJabs, Flickrs, and Odeos of the world — as well as the advertisers, alas — will continue to use Flash until something better comes along. For the rest, though, Ajax will probably knock Flash aside.

(Disclosure: Tim is on the board of Macromedia, but I haven’t talked to him about this topic at all.)