Update:Since I wrote this post a lot has changed. In many ways things have come along faster than I could have hoped for; in some ways they have not, and as expected Flash is being used as a fallback for video, Canvas/SVG/WebGL, and especially audio support which is horribly broken across platforms [May, 2011]. A lot of the really advanced JavaScript, Canvas and WebGL is being done by long-time Flash developers, the skills were transferable. On the whole what is written below still stands, but hindsight is a lovely thing to have.
It’s especially interesting to note that Apple played a big part in the negativity surrounding Flash, with iOS devices not allowing Flash Player support, even after Android showed the reasons given were disingenuous. I was myself faced with difficult choices. Clients need to see their content running on iPads and iPhones, the creative industry is saturated by them. This has led to lower creative ceilings and lots of hacking to get enhanced content working across browsers, I find I have inadvertently become a full time Android developer until the dust settles (something that has proved enjoyable). It’s also become apparent that we’ve seen Apple side-step from the vigorous backing of HTML5, instead continued support for the native, single platform, revenue generating, app.
And with that, back to the post…
This post is not about defending Flash. As someone who always jumps on the chance to learn a new language or tech I couldn’t care less whether Flash sees another year. But I would rather use the right tool than find myself spending too much time hacking at something not quite fit for purpose.
“The World is moving to HTML 5″
This poignant, yet immediately dated quote is supposedly from Steve Jobs, as reported by Wired. The article speaks of HTML 5 being used to create sophisticated web pages, and I wholeheartedly agree. If you are building web pages, HTML and JavaScript are almost always the right technologies to use, but we went beyond solely building web pages many years ago. Web pages are not the only type of internet destination, even though the ever vocal standardistas seem to think that’s what everyone wants. I say get your head out of the sand, it’s nice out.
Types of Web Content
We can break down web content into four main categories:
Pages
Pages were once the only type of content to be found in a web browser, primarily there for information display with very little user interaction, they are designed to provide the desired content as fast as possible, as such they tend to use text as the primary method of communication, they work very well with search engines, and they date just as fast as anything else (Microsoft’s first web presence).
Dynamic Pages
We have in this category the semi-interactive stuff that AJAX has found a home with, adding dynamism to an otherwise static page, and it does this stuff very well indeed. In short, it’s all very direct and to the point, it works outstandingly well. If you had to wait for an intro to play before you found out the price of the avocado you want to buy from your online supermarket you’d go elsewhere.
Experience and Brands
Then again, if you’re a 14 year old boy who loves watching Top Gear and you’re being delivered a loud, visceral and engaging experience for a super-car brand, this is the 21st century equivalent of that Ferrari F40 poster on your wall, that aspirational experience now even more compelling; one day you’ll drive that car. It may be interesting to some people to scroll through a highly efficient search engine friendly static page to see this kind of thing, but it’s really very boring for most people. There is a world of purely enjoyable content out there; don’t paint it grey. If you’re trying to build a brand, you have to tell a story.
Applications and Games
This is really a big part of what the web is today. Web-deployed applications and games have proven their worth. Open to wide audiences across multiple platforms, secure, immediately updateable, cheap to develop, and getting ever more sophisticated. If you look at these examples all done in Flash, I’d ask you what else you’d use that ticks all those boxes:
- Aviary – everything from bitmap and vector editors, texture generator to an audio editor, truly incredible.
- Hobnox audio tool – emulates in real time, hardware instruments for creating electronic music.
- Big and Small – Content for kids, it has to be fun and interactive to compete with TV.
- Google Street View – The reality is, the transitions and interaction that make it so impressive, require Flash, and we know Google are pretty much the best in the business at AJAX.
I wouldn’t underestimate the shift to web-based applications, IMHO nearly all applications will be web-based in the next 5 years; applications that include office suites, image and video editors, casual and hardcore games, music production software, and of course the most ubiquitous, social networking and media sharing. All of these are equally deserving of being available to users of a web browser, all of these requiring the most cutting edge technology available in order to stand out from the crowd and avoid being locked into the glacial flow of web standards progression.
Plugins
Plugins drive things forward by letting non-techies bolt on new functionality. Director, Flash, Unity all did or still do their part. Zoom forward 5 years and let us visit a perfect world where all the major browser vendors, including the behemoth Microsoft, have agreed on the various parts of “HTML 5″. Miraculously IE supports the same Canvas abilities and video codecs as the iPhone, Android and Nokia browsers, Mozilla (Firefox) has conceded to paying h264 royalty fees, sites with video content have conceded to paying h264 broadcast fees, everything is gonna be allllright. The issue now is that things are looking a bit dated, the browser can now natively do what Flash applications were doing 5 years ago. This is a never ending game of cat and mouse, no-one can argue one is better than the other when nothing is standing still.
And so what now? What about new technologies, where’s the now ubiquitous multitouch we’re used to seeing since Flash 10.1, since iPhone and Android devices dominated the markets. Maybe that’s in the HTML 6 spec, maybe just in Firefox, how many more years after we start using it does it become standard. Along with multi-touch there will be many more features missing, we will still need plugins. Flash has added a myriad new features that game programmers and web developers are using to create a whole new level of experience that has obliterated the console and desktop software markets. HTML 5 is starting to look a lot like HTML 4 used to. Long in the tooth.
HTML 5
If we come back to today, I think it’s important to clear up just what this HTML 5 really means. It’s more than a spec, in general the term is used to refer to the many sub-technologies involved, including new HTML markup, the Canvas tag for 2D (and possibly in future 3D) static and dynamically scripted graphics, fast JavaScript VM’s like Tamarin (donated by Adobe), a video tag for playing back a choice of video files, and possibly WebGL which aims to bring OpenGL 3D graphics to the web on par with Unity3D perhaps. I need to make it clear that I really want this to happen, no matter how open to feedback Adobe are, no matter how open the SWF format is, it does not sit well with me that one vendor controls what will and will not go in to the runtime, and it’s still a plugin, no matter how easy and fast it installs, something doesn’t quite feel right about it.
But I live in the real world, it’s mainly this technology that I’ve used to pay my way since I was 16, and that doesn’t show any signs of slowing. I am 100% willing to use HTML 5 if it suits the job. I’m not sitting around either, trust me. No flash developers are tied in to using it. But there are too many things stopping me from switching. Let’s take the hot topic of the day, the <video> tag; it doesn’t even replace what you could do with Flash 8 or 9 let alone some of the cool things you can do *right now* (no waiting)…
Video
Flash is not video. The Flash Player was installed on over 90% of internet connected computers before YouTube, when Flash video was limited to the early Sorenson Spark codec, optimised for small files that performed really badly at anything larger than 320×240, and 8 years ago when performance was so bad with Flash video we were using postage stamp sized video, but it was the immediacy of the playback that made it successful over more powerful plugins like Quicktime, WMV or Real Player. Either way, Flash video clearly changed the web, no more picking a plugin, picking your bandwidth, looking at truly ugly system chrome, so let’s look at what we need to see from HTML 5 video for it to displace Flash as the most efficient, cost effective and flexible solution:
- DRM – Boo, evil. Whatever your personal view on DRM, broadcast corporations want it.
- True multi-bitrate streaming – Efficient live feeds across the globe that alters bitrate to suit current bandwidth, multicast (Flash Player 10 also supports a P2P UDP to take pressure off the server, or provide much faster messaging in games).
- Internet Explorer – The truth of the matter is that it has to work with IE. If you’re using Flash as a fallback, as suggested by ALL current HTML 5 video player supporters, why are you making more work for yourself? For a simple video player fine, but a lot of video is increasingly interactive. YouTube for example overlay recommendations, annotations, detected music, and even live commenting, you really want to do this twice?
If >this< is the cream of the crop right now, and it doesn’t even work in Firefox or Internet Explorer (percentages?), what is there to shout about?
Yeah but Flash eats 100% of my CPU
In a sentence: so do the most basic HTML 5 experiments (link).
An empty SWF consumes ~0% of my CPU, funnily enough the same amount as an empty web page. When something eats 100% of the CPU, it’s because is is doing something computationally expensive, possibly animating high quality 32-bit images whilst applying real time bitmap effects so that you can see just how that logo will look on this crumpled T-Shirt before you send it off to be printed. The CPU usage is not automatically higher with Flash, it’s down to the design and programmer to figure out what they want to achieve, and optimise it to whatever they find acceptable for their intended audience. JavaScript can and does use 100% CPU in some of the best apps out there, we just don’t see many apps that are up to the level of the Flash apps linked to earlier in this post. Video acceleration is a fair point until you consider video is also a display object in the Flash Player that can have these filters, transformations and so on applied in real time, that comes at a cost, however with Flash Player 10.1 hardware acceleration is starting to come into play, a truly impressive feat for such a small cross platform runtime.
If we kill Flash, we kill annoying banner ads
It’s also the case that displacing Flash will not get rid of annoying banner ads, agencies will just use <canvas> and <video>, don’t kid yourself, it’ll be those same Flash developers making it, they would simply re-tool and utilise their existing experience to produce infuriating ads in whatever makes the biggest impact. The internet is only less annoying with things like FlashBlock because only a tiny drop in the ocean of internet users use Flash block so they scoot under the radar. They are excluding themselves from the mainstream for this small benefit and more power to you for doing that, it’s up to you.
Browser integration
This is a major sorepoint for me as my primary job has been developing ever more complex Flash applications that are deployed on the web and on the desktop (indeed to replace existing desktop apps). You can communicate in real time between JavaScript and Flash, passing simple and complex data types between them, but it’s still a black box on the page. This is a really tough nut to crack, if you spend just 10 minutes asking yourself how you could get a native desktop application that you’ve embedded in a page to play well with the HTML around it, you’ll see why it simply doesn’t make sense, we shouldn’t try to shoe-horn these things.
The Semantic Web and Accessibility
Another gotcha. I can absolutely agree these things are so very important, depending on the content. What on earth is the point of making accessible a site where the entire aim is to build a burger out of people dressed up as beef, buns and lettuce, running and jumping on one another in a video montage. You may think the site should not exist anyway, but who are we to dictate what kind of content can be put online. Some idiots love this stuff and clearly so did Burger King! What about a game like Dofus? Semantics and accessibility don’t apply to everything. You can build Flash sites to be accessible, you can build them on top of a CMS like Drupal to make sure you get the best of both worlds. In summary, use the right tool for the job.
Mobile
This one is very important to me. Hand on heart, devices that we now consider mobile: phones and tablets; these are going to be how 90% of people use computers, period. There’s simply no need for bulky laptops and desktops for non-professionals. Wireless TV connections let you get that big screen experience when you need it, but the redundancy in devices will be huge. This became clear in my own circle of entirely non-geek friends already, almost exclusively using mobile devices for everything, and this at the very beginning of the full-on shift to web-apps.
It became quite clear to me in 2007 (link) that Flash was never going to do well on mobile until it was the same runtime as the one we were using on the web, especially when it was licensed per handset. Funnily enough I called that convergent version “Flash X”, and it turns out “X”, by pure coincident, was right, in a roman numerals kinda way. Flash 10.1 has been optimised to run on lower powered CPUs like ARM chips found in iPhones and Android devices.
Hating Adobe
The animosity directed at Adobe is unusual. They simply invest in whatever proves popular in order to generate revenue, and they’ve had a lot of popular HTML/JS editing tools, even demoing Canvas support in the next Dreamweaver IDE. When Director started to die, occasionally being used for the odd online 3D game, and Flash took off, they invested time and money into creating what they like to call the Flash Platform. A range of commercial and open source tools, open-spec file formats for rich media, binary data transfer and a video container, a runtime, and a few free and commercial serverside offerings. They are not forcing anyone to use this stuff, if we stop using it they will move on like they have in the past, investing in whatever it is people do want to code in. In my opinion, Adobe will be the second big player, after Apple, to fully embrace HTML 5 in their software, with Microsoft lagging behind a very long way.
Conclusion
To everyone shouting support for HTML 5 as the flash killer, if that were really possible don’t you think Flash developers would already be doing it? We are a thriving community positively chomping at the bit to try out new stuff, I’m presenting on Android at a Flash user group shortly, we don’t hang around. We weren’t born knowing ActionScript 1, 2 or 3 and we have to live in the real world, we may even be right next to you. Indeed many Flash developers are also HTML/JS developers and may practice a serverside language in smaller companies. It just leads to frustration when we hear “use HTML 5″ when it is not supported even across desktop browsers. What version of IE should we be targeting before we can start building the rich compelling experiences we’re used to.
The world will move to HTML X when Flash X is not needed, it is a non-argument, no amount of insane zealous preaching from within the idealist world of either side will make this happen in the real world. The market will use whatever tools provide the best solutions for the best return on investment.
I can’t wait till we get through this next transitionary period, with web designers having to spend twice the effort providing Flash fallbacks to video, companies encoding and hosting their videos in multiple formats, this will be another messy, frustrating time for web users and progress may slow, but I can’t see a way around it. For now we push on, pick the best tool at the time, and hope for faster product cycles from browser vendors.