« | Home | »

If all the Web were Flash

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:

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.

Topics: Web, Internet, Computing | 10 Comments »

10 Responses to “If all the Web were Flash”

  1. Peter Capek Says:
    February 15th, 2009 at 11:32 PM

    There’s another important difference (between HTML and Flash and Silverlight): HTML isn’t proprietary, but, I believe, both the others are. So learning about how the web works would likely be even more difficult if one had to understand their representations.

    I wonder also whether, in the web’s early days when network performance was much poorer, the size of the files involved with this kind of representation would have been an inhibitor to growth.

  2. Tim Says:
    February 17th, 2009 at 6:07 PM

    How dare you make sense, sir? How dare you use logic and rationality? Bollocks, I say. I /demand/ you attack Flash with all your might, and come to the logical conclusion that is flawed in all aspects, nobody needs it, and it’s going to single-handedly destroy life on earth. Because technologies such as SVG and animated GIFs can easily replace it. It’s the only right thing to do.

    Seriously, though, it’s refreshing to see analysis/opinion on the technology, and specifically of this platform, without any sort of bias. The web definitely /shouldn’t/ be all Flash (and I say this as a Flash developer), but there’s a lot of people that are too quick to ignore the reasons why some kinds of content – or, specifically, some kinds of /experience/ – /should/ be presented with it. I, too, would love that we had a super-open, standardized, owner-less platform to work with, but we don’t, and trying to ignore the advantages of this platform while we pretend alternatives that fit into some imaginary dogma exist is just foolish.

    And in that aspect, I hope your last paragraph is right. I honestly do. I’d throw my 10+ years of Flash/Actioncript experience out of the window if there was a better solution for what Flash does. But there isn’t.

    However, I also hope some other people (not you) can get down their high horses and recognize what Flash (and others) are doing right instead of denying it, or just assuming it sucks because they’ve seen banners they don’t like. That’s the only way we’ll reach our true open future, not only for text documents but also for applications with states and a rich experience and what have you.

  3. Matthew Fabb Says:
    February 17th, 2009 at 9:21 PM

    Note that Adobe’s Flex Builder has a checkbox in the compile options to include a “View Source”. Many open source projects, tutorials, bloggers just showing examples have this option checked off so that you can take a look at the source code. Here’s an example off of Adobe’s Flex Style Explorer:

    However, this is likely an effect of the popularity of View Source in browsers to view HTML, CSS and JavaScript and may have not happened without if the web started off just with Flash.

    As for searching SWF files, I imagine if the web started with Flash, we would have discovered searching solutions earlier. Either tagging the data outside of the SWF file (few Flash applications have the text sitting inside SWFs) or something similar to the headless Flash Player Adobe gave to Yahoo and Google. Because they would have been a major navigation problem without search and the technology would not have gone forward without a solution.

    Also on the flip-side it’s interesting to think where would the web be without Flash. I think video would be many years behind what it currently is and rarely used beyond movie trailers. I think audio would barely be used on the internet. I don’t think HTML5 would have had a canvas, video or audio tag yet. However, perhaps HTML5 would have already been finalized since it would have been majorly scaled back. Would AJAX RIA’s be the same (at least not called RIA’s since that was coined in 2002 by Macromedia to describe Flash applications) or would they still have been as ambitious without Flash providing examples of what was possible in stateless applications?

  4. Noah Says:
    February 17th, 2009 at 9:41 PM


    That’s cool. I confess I’ve never stumbled on a Flash app that gave the View Source option until you pointed it out. I stand corrected. Still, when I get source from HTML, I can paste it into my own page and be on the air in minutes. With MXML, that only works if I have the toolchain. Still, it’s great that it’s there.

    Your comment does remind me of one other point I didn’t mention. Neither Flash nor Silverlight seem to encourage good use of the right mouse button. Copy/paste is such a huge part of the data integration story for the Web and other applications, and both Flash and Silverlight tend to not enable it. I’m not enough of a Flash expert to know whether it’s possible with effort, or completely impossible. Am I the only one who dreads finding that something like a hotel Web site is in Flash, because you can’t copy/paste things like the address and phone into your own documents?

    As to searching: I take your point, but I think it’s pretty essential to the Google model that what you’re searching is all the content as the author wrote it, not some external tags.

    Thanks again for the great comment!


  5. Matthew Fabb Says:
    February 18th, 2009 at 10:12 PM

    All text in Flash can be selectable for copying and pasting. However, the developer needs to turn on the selectable option (simple as clicking an icon in the text properties) as unfortunately it’s the default option is to turn it off. I imagine that this is a result of Flash’s roots as an animation tool, where animating text should not be selectable. As developer, there’s been times in the past where I’ve had to go back to a project and recompile it because text that was supposed to have been selectable was not.

    Also note that you can compile MXML and AS files using Adobe’s free open source command line compiler. Not quite as good as launching plain HTML text in the browser window, but it’s easier than having to install Flex Builder or the Flash IDE.

    However, there’s still no way to compile FLA files without the Flash IDE, but hopefully that will change in the future. Adobe is currently in the process of changing the Flash file format for the Flash IDE from the current FLA to an new format called XFL. An XFL file is basically just a zip file, filled with any graphical, video and audio assets and XML files describing where the content goes. Hopefully this will result in a separate XFL compiler, but we will have to wait and see.

  6. Noah Says:
    February 18th, 2009 at 10:37 PM

    Again, thanks for the helpful clarifications. As you can see, I’m not an expert in details of Flash development. Still as a practical matter, the text on a typical Flash site is not copyable. No doubt that’s because of the default, but it’s a big loss. Thanks again.

  7. Mark Laff Says:
    March 11th, 2009 at 4:47 PM

    Excellent topic, Noah. An important distinction, though, is between HTML, which is declarative and can more easily be learned by inspection, and DHTM using JavaScript. The programming background and concepts necessary to parse/understand/learn-from reading JavaScript may be orders of magnitude harder to pick up. Structures and actions are invisible until the code is executed. I wonder how quickly the Web would have taken off if there were a high level of JavaScript early on.


  8. Patrick Logan Says:
    March 18th, 2009 at 5:09 PM

    “what would the Web be like if, instead of HTML, it had used Flash for everything?”

    This seems a bit of a strawman argument. I am not aware anyone ever proposed such a thing, nor do I suspect anyone in their right mind would.

    Maybe one should analyze “what would the Web be like if, instead of HTML, it had used Oracle DB blobs for everything?” or maybe “what would the Web be like if, instead of HTML, it had used CORBA for everything?”

    I think there are many grounds for criticizing Flash (and Silverlight). This does not seem to be one of them.

  9. Noah Says:
    March 18th, 2009 at 6:22 PM

    Patrick Logan wrote:

    > This seems a bit of a strawman argument. I am not aware anyone ever proposed such a thing, nor do I suspect anyone in their right mind would.

    Yes, Patrick, but I had hoped the physics analogy was clear. Physicists don’t really believe that anyone is going to have to deal with infinitely massive cars. They perform the thought experiment “what if a car were infinitely massive” to help themselves think clearly about the effects of increasing mass. In a sense, all such physics though experiments are “strawpersons”, and intentionally so.

    So, my point was never to suggest a serious chance that Flash would displace all the HTML on the Web, but rather to highlight some of the pros and cons of Flash and Silverlight architecture. The fact is that Flash is being used for more and more Web content, and it’s not clear to me that those making the choice notice the consequences as often as they might. For example, it was just a few months ago that I went to the Web site for a small hotel (in the UK as it turns out), and was very frustrated to find that I could not copy/paste the address into an email because the only available form of the page was Flash. Maybe or maybe not the designers of that site understood the tradeoff of having a nice smooth animation to introduce their hotel vs. allowing their address and phone to be copied without pen and paper, or maybe they didn’t. They obviously didn’t take the extra trouble to enable copy/paste in Flash.

    Anyway, I tried to be balanced in looking at the pros and cons of Flash and Silverlight, but I stand by the analysis of the cons as well as the pros. I certainly hope that fans of Flash didn’t take offense. I do think that careful consideration is needed when choosing it in place of HTML, and I’m not convinced that enough “Webmasters” understand the tradeoffs, or take the trouble to minimize the downsides. That was the reason for my posting.

  10. Patrick Logan Says:
    March 18th, 2009 at 6:44 PM

    “Yes, Patrick, but I had hoped the physics analogy was clear.”

    I understand the analogy. I think the point could have been made better without using that analogy.

    I should not fault the attempt, I suppose. But there are enough misconceptions (and actual past practices) of Flash that are preventing it from being used effectively for what it is.