26 November 2007

Why Javascript, not Flash? - Ask Zoho

I've only just come across this, perhaps the best summary of why using Flash is the wrong way to create Web apps:


1. Native to the Web

A real web application should natively support web standards - HTML & CSS are pretty much synonymous with “web standards”. The biggest reason we started out with Javascript is that it is native to the web - in the sense its core object model for Javascript is the HTML/CSS Document Object Model. The DOM is a gift to web applications. Even with the annoying browser differences in DOM (which sophisticated libraries increasingly hide), it is still far better to have the DOM than not have it. Flash, for all its advantages, sits in a separate space from the browser. In that sense, Flash is not that different from Java-on-the-client. In fact, Flash is Java-on-the-client-done-right.

I am sure Flash will eventually find a way to natively integrate with the browser but it is not there yet.

2. Open Source Library Support

This is a big one. The depth and variety of libraries available in Javascript just keep getting better. It is mind boggling just how much open source development is going on in Javascript. Developers keep pushing the envelope. For one example, look at the jQuery solar system demo. It shocked me the first time I saw it. Pretty impressive that Javascript could do that, right? The capabilities of Javascript exceed the client requirements of office productivity applications today, and there are tons more innovations coming.

3. Vector Graphics in Browsers

This is another big one. Vector graphics formats like SVG (Firefox, Opera), VML (IE), and HTML Canvas (Firefox, Safari, Opera), are becoming ubiquitous in browsers. Yeah, it sucks that IE doesn’t support SVG, but that can be worked around. Even cooler is the fact that SVG & VML are XML and very Javascript friendly. You can do real magic.

Obviously, number 2 is the heart of the matter: Javascript is just going to keep getting better, faster, thanks to the open development process. With Flash, you're dependent on the skills of one company (now, where have I heard that before?)

3 comments:

Anonymous said...

In all fairness, one has to remember where Flash started. As a tool for design, and not really targeted at developers. I have a feeling that in time Flex/Flash will open up more and more as recent signs suggest. If not, the folks at Adobe are dumber than I thought.

On the development end, each has it's place. I don't think you could dream of developing something like Picnick in Javascript.

Unknown said...

And we can't forget that, at least as it's currently used, Flash is horribly, awfully inaccessible for people with disabilities. Screen readers and adaptive interfaces are locked out.

Glyn Moody said...

Indeed: it's quintessentially opaque.