Flash isn't dead, long live HTML5 close

17th June 2010
Flash isn't dead, long live HTML5

Shock horror Flash doesn't work on the iPhone or the "magical" iPad. Steve Jobs has declared its death, and decreed that it's not worthy of inclusion in Apple's market leading mobile platform. Dropping Flash in favour of HTML5 is akin to replacing floppy drives with CD-ROMS we are told. You don't need it, you will be better off without it, it's time to stop living in the past and embrace the future. Naturally Adobe (the makers of Flash) aren't too happy about having the door slammed in their face. Adobe tried launching a campaign online but were forced to accept they have lost the battle. However the war is only just heating up; Google's latest phones support both HTML5 & Flash.

The controversy has been fodder for bloggers, sparked flame wars between fans, and led to an awful lot of FUD (fear uncertainly and doubt) being spread online. This puts many of us in the industry in an odd position. For years Apple and Adobe have been the pillars of the creative industries. As developers and designers we have a love hate relationship with both companies. Designers need photoshop to get their work done, yet vent about it online. Developers love apple hardware, but have a hard time accepting the App Store's restrictions on how they can write their apps.

Which side are you on?
Despite what you read online I don't see a major split in the web community between HTML5 and Flash or between iPhone and Android for that matter. On the contrary, I see lots of overlap. In our industry it pays to have multiple disciplines. Lots of the popular games for the iPhone are written by people who are also Flash game developers. The people doing the cool 3D demos in HTML5 are often the same people who pioneered 3D in Flash. Those of us working on the cutting edge do not erect walls between technologies, we tear them down.

Flash has a long history of bringing innovations to the browser: animation, fonts, audio, video, 3D, and networking to name just a few. Recently we have noted interest and momentum building behind HTML5. It's about time browsers had native support for many of the things Flash has supported for years. The 4 "modern" browsers (Chrome, Safari, Opera, Firefox) are competing against each almost daily to take the crown as being the fastest, and most feature complete implementation. Competition is a good thing, after years of stagnation it's an exciting time to be working in the web. If you are stuck using a "legacy" browser (hint: the one with a blue e) do us all a favour and upgrade today, I promise you won't regret it.

Unfortunately outside of cutting edge Mobile web it's hard to fully utilise all the advances offered by these "modern" browsers. The elephant in the room remains every web developers pet hate; Internet Explorer with it's stubborn 50% market share. Even if Microsoft were to support full HTML5 and CSS3 in IE9 (unlikely), we won't see IE7 and IE8 disappear for years to come. Many sites are only just getting around to phasing out IE6. The key strength of Flash has always been that it's cross browser; unencumbered by the incompatibles and quirks that have plagued browsers. With penetration rates hovering close to 100% and a fast upgrade cycle driven by automatic updates it's no wonder Flash has become the de-facto standard for delivering video and rich experiences online.

So where does this leave HTML5 and CSS3?
Some features lend themselves to progressive enhancement, enabling HTML5 drag and drop file uploads or offline storage for those with capable browsers is an easy win. Using the latest CSS3 properties to render nice UIs while still degrading gracefully to support IE can be tricky, but is doable. It doesn't have to be pixel perfect, it just needs to work in older browsers. This leaves those features that you can't degrade gracefully without falling back to an alternative such as Flash. This category includes the much hyped video tag and canvas element.

Video support in HTML5 is still a bit of a minefield, there are 3 different codecs (H264, WebM, and Vorbis) that may or may not work in your browser, some with critical hardware acceleration, others lacking. In order to provide the best experience on the web and mobile you need to encode and deliver the video in multiple formats as well as providing a Flash version for those without HTML5. There are other rough edges too, such as fullscreen support; which depending your browser works differently or may not be supported at all. My advice to clients is to do what YouTube is doing and give users the choice to pick what works best for them.

This brings me to canvas element, a resolution-dependent bitmap canvas, used for rendering graphs, game graphics, or other visual images on the fly. Many of the demos show it being used for amazing Flash like experiences. Unfortunately there are problems here too. when you do a lot of animation and graphics processing you are going to burn CPU. Lots of it. Technology can always be abused at the expense of your CPU, those annoying battery draining banner ads can be rendered using canvas on the iPhone too. Recently Flash player added code to throttle down processing on browser tabs that are not active. I expect a similar feature will have to be added to browsers to control canvas abuse. Then there is the legitimate concern of accessibility, while it can be a challenge to create truly accessible Flash, it is at least possible.

In conclusion
Despite all the challenges I think it's our duty to push for the adoption of the latest web standards. While I may not agree with Steve Jobs reasons for banning Flash from iOS, I'm grateful that the controversy has put the spotlight on HTML5. I take issue with the assertion that Flash is a dead technology, on the contrary I see Adobe continuing to innovate and evolve Flash for many years to come. When noise generated by all the bloggers and fanboys has died down, it will be left to us humble web designers and developers to make all these technologies work for users.