Hypermedia and data visualization projects by Chris Wilson

Flash and its Discontents

Until about I year ago, I coded most of my projects in Flash and its cousin Flex, which is developed entirely in code without the benefit of Flash's visual interface. (It's sort of like the different between algebra and geometry, though since Flash moved to Actionscript 3, it resembles Flex a lot more.) Both platforms can draw very quickly and create enormously complex animations and interactives, though they can often eat up a lot of system resources in the process.

The general move away from Flash seems to have begun with the introduction of the first iPhone, which did not support it. While I admire the late Steve Jobs, I still resent that he closed down the development for his iProducts to a closed SDK, essentially doubling the work for people who want their applications to run smoothly on the Web and Apple products (not to mention other mobile platforms). 

Sheerly for the sake of efficiently, we started used the Javascript library Raphael for most visualizations. Raphael is based on the drawing platform SVG and is also compatible with Microsoft's equivalent structure, so it made life easier to do things once. I can't say enough about how useful that library has been to my data visualization projects. It has the added benefit of running natively in the browser, so it doesn't matter whether the user has updated his or her Flash player recently (or ever). 

I don't think this is a permanent solution, however. Raphael cannot draw as quickly as Flash, making projects like county-by-county maps over slow to the point that they're unusable. The obvious successor is HTML5, whose canvas feature makes for much more elegant drawing inside the browser. Unfortunately, the 30 percent or so of users who still use Internet Explorer 8 or below cannot view HTML5 content, and most of us can't afford to lose that audience. (IE9 can render many parts of HTML5, but requires an upgrade to Vista or Windows 7.) 

For intensive visualizations, I fear the short-term solution will be to code interactives twice, once in HTML5 for modern browsers with a Flash fallback for the IE crowd. A very clever developer might be able to write a meta language that could port to either platform with minimum recoding. This would be a major asset to anyone interested in reaching a maximum audience with powerful applications with dazzling capabilities.

Posted by chris on November 20 2011

Related tags: Flash, HTML5, Raphael