By Noah | February 15, 2009
Long ago, I got a degree in physics, and one of the things physicists do is to ask “what would happen if you took xxxxx to the extreme limiting case?” For example, what would happen if the mass of your car were infinite, or if the size of the electron was arbitrarily small? So, a thought experiment for the Internet: what would the Web be like if, instead of HTML, it had used Flash for everything?
Flash is in many ways a terrific technology. If the Web was all Flash from day one, there would be more movies, more animation, more flexible user interfaces and probably more good audio, but there would also be some real problems, I think. Some things that might not have worked out so well include:
- Search engines like Google or Alta Vista might never have sprung up, because Flash content is hard or even impossible to index.
- People learning to write content for the Web would not have been able to learn new tricks and coding techniques by reading the source of Web pages that they like.
- HTML is created and served on platforms ranging from mainframes to traffic lights. It’s not at all clear that the tooling and runtimes needed to create byte coded Flash content could have been well deployed and supported on such a wide range of platforms.
Microsoft’s Silverlight suffers from pretty much the same challenges. Below I’ll explain why I think the above points are true, but first let me say some good things about Flash and Silverlight. Both of them let you create user interfaces that are well beyond what’s possible with open Web technologies today. The Adobe tooling is excellent, and more to the point, users seem to like it. Silverlight is also pretty good in those departments, and is improving quickly. Those are no small achievements, and when you really need the multimedia or rich animations that these environments provide, they can be good choices. Having tools that provide real value and that customers like is pretty significant.
Still, there’s a lot of debate about what the Rich Internet Application architecture of the future is going to be, and technologies like Flash and Silverlight are candidates. So, it’s interesting to ask what would happen if they were used ubiquitously. I’ll talk specifically about Flash, but assume the same pros and cons mostly apply to Silverlight as well.
The fundamental issue I have in mind relates to the way content is sent through the Internet. With HTML, the content of your page is sent through the network in a simple text format, HTML, in which all the content as well as links to other pages is easy to find. Search engines like Google do their work by wandering through the Web, finding all the pages they can, and seeing which important pages link to other important pages. Also, with HTML, any user who wants to see how a page is built can use the browser’s View Source command to learn. Many people believe that this View Source Effect made a huge contribution to the success of the Web. I know that my own son, when he was 12, taught himself to write simple HTML by studying pages he found on the Web. These characteristics of the Web are not accidents: they are intentional design choices made to promote adoption of the Web and to facilitate extraction of information from Web content.
With Flash, what flows through the Web is not a simple text file, but a binary-coded computer program that has to be run by a Flash player. Page content is coded up in what’s called a SWF (pronounced swiff) file that contains the program. To find out what the page contains, for example whether it contains the Declaration of Independence or a stock quote, you have to run the program, and looking at a program encoded into a set of byte codes is not an easy way for a user to learn how to write Flash pages. So, we tend to lose the view source effect.
Running a program to find out what’s on a page is also not an easy thing for a search engine like Google to do. First of all, the program might run for a long time before producing any output. Even if the program worked, there’s nothing that says it would be easy to determine, for example, which text in a document falls under which headings, since the program could paint or update it in any order. In fact, Google and Adobe have recently announced an effort to find a way to dig into Flash byte code files, so that Google can index any static text that’s inside. That’s a good step, but it doesn’t change the fact that systems like Flash can compute a lot of page content on the fly, and that dynamic content can’t be discovered without running the code. More importantly, nobody really understood the potential of Google until the early versions were built and deployed. Without that early success using HTML, it’s not clear that anyone ever would have gotten as far as teaching Google to index Flash. We might never have had search engines on the scale of Google at all.
As noted above, most of these concerns trace to the fact that Flash and Silverlight encode Web content as binary computer programs rather than as declarative text files. Tim Berners-Lee and I co-edited a TAG finding titled, the The Rule of Least Power. It’s not about Flash or Silverlight, but it explains why for a system like the Web, it’s very important that information be transmitted in a form that’s easy to process and reuse.
In closing, I want to re-emphasize that this note is not intended as a broad attack on either Flash or Silverlight. The choice of technology for the Web or any other application is a tradeoff. Flash and Silverlight have some wonderful characteristics, and some really powerful tooling. Right now they’re ahead of what widely deployed Web standards provide, or even what HTML5 promises, for building scalable, multimedia appplications. If you need the power they provide, use them, but keep in mind some of the tradeoffs. I do think the Web will have a richer future (yeah, dumb pun) if we can eventually find approaches that are not only more “open” politically, but more open technologically, for providing better content on the Web.