Flash, HTML5 & iPads
The iPad's release, and specifically the omission of support for Adobe Flash, has sparked a massive response from both the Flash and web standards communities.
Adobe and its development community are understandably miffed that Flash support has been omitted, pointing out the masses of sites around the web which rely on Flash to deliver a 'superior user experience'.
Apple and the web standardista's are making the argument that Flash on a mobile device is a CPU hog, draining battery life and causing instability. HTML5 is being pushed as the solution - offering similar functionality in terms of delivering online video and vector animation.
Obviously its a topic which a lot of people feel strongly about and there is a lot of bias and misinformation floating about.
As a web developer who has spent considerable time working with both HTML and Flash, I can see both sides, but feel that in the end Flash is not going away anytime soon, and as others are proclaiming its snubbing by Apple is not going to be the final nail in the coffin.
There is certainly a stigma associated with Flash itself, for many reasons.
- Especially around 2001-2006 there have been gross misuses of Flash as a technology. From website intro screens to superfluous visual effects, many people have came to despise Flash content.
- Various (now patched) security vulnerabilities have led many software architects, primarily in the enterprise, to distrust the technology in general.
- The Flash Player is often seen as a CPU-hog, which consumes too many resources and is prone to crashing. This is perhaps more of a problem on Mac OS than Windows, where it is claimed that the most common cause of Safari crashing is the Flash plug-in.
- Up until very recently Flash has been a closed source application, controlled by a single vendor, Adobe.
If we peel back the layers, most of the criticisms aimed at Flash are either unfair, or no longer valid.
Over the past decade, developers have matured and we are seeing Flash frameworks emerge which use common architecture design patterns. Designers are also using Flash more as a tool to enhance the user experience rather than to provide superfluous visual effects. Granted, you still have the odd developer/designer out there who throws user experience out of the window for the sake of some animated, flashing text but you get that with every interface technology.
Adobe is also committed to the security and stability of the Flash player, releasing regular updates and working with operating system and hardware vendors in order to optimize performance. Obviously this has to be a two-way street, and companies such as Apple need to be willing to work with Adobe if we are to see real improvements in stability and performance. From what I gather this is not the case. Adobe has also made an aggressive push to open-source various components of the Flash Platform, meaning developers are no longer locked into to a specific set of developer tools.
So what is Flash good for? Whilst it is used for many things, three stand out in particular:
- Advertising. Someone had to say it. Whilst Flash adverts are often the bane of the web, from a design agency perspective it is the perfect medium. Designers can create advertisements for products incorporating animation and visual shine which are not possible with static images, compiled into a single SWF file which is guaranteed to look the same regardless of the browser or website where that advert is displayed.
- Video. Today flash is the most widely used player of h.264 video files in the world. Its ubiquity is what has led to the success of YouTube and sites like it. Not only does it play video, its actually quite good at it - offering functionality for streaming and interaction with a video feed.
- Applications. With mature frameworks like PureMVC and Flex, the Flash Platform offers a great environment for building rich web applications. You only need to take a look at the likes of Buzzword and Picnik to get a feel for what is possible. Much richer interaction than HTML web apps, with the added benefits of cross-browser consistency and a more integrated set of development tools.
With HTML5, I only see one item disappearing from this list. Let me explain.
So, HTML5 brings a number of great features into the mix for developers:
- The video element, allowing video to be displayed within the browser without the need for plugins.
- The canvas element, allowing for dynamic, scriptable rendering of bitmap images.
- API's for drag and drop, cross document messaging, offline storage, browser history management and more.
As you may have gathered, a lot of these enhancements are geared towards those developing web apps, and this is where I can see HTML5 stealing market share from Adobe.
If we consider online advertising, many people seem to think that the canvas tag, and to some extent CSS3, is going to replace Flash as a medium for delivering animated web content.
In reality, to replicate a simple animated Flash banner, you need a good chunk of CSS, JavaScript and separate image assets. On top of this you need additional JavaScript to make the canvas tag compatible with older versions of Internet Explorer and multiple implementations of certain visual/animation functions to ensure full cross-browser compatibility. And, you need to spend time sandboxing your code to ensure that it doesn't conflict with other CSS and JavaScript on the site where it is published. Even then, your HTML5 banner is likely not going to look right in a good deal of browsers.
Compare it to the Flash workflow - you create your banner in within your favorite IDE, and its packaged up into a single file which you can distribute, upload to ad networks and more. Plus it will look the same across different platforms and browsers.
Creative agencies are simply not going to put the time into creating HTML5 content when the Flash player is so ubiquitous and where Flash is the creative format of choice for the hundreds of advertising networks and exchanges out there.
So Flash adverts, unfortunately, are here to stay.
The video tag is a lot more interesting - can it provide an alternative to Flash video? In an ideal world, yes, in reality, not for a while.
For a start, browser vendors can't seem to agree on which formats the video tag supports. For developers that means having to provide the same video in two formats - Ogg Theora for Firefox and MP4 for Chrome and Safari. Not ideal, especially when you factor in the additional costs of hosting additional copies of a video.
Secondly, whilst you can jury-rig much of HTML5's functionality into Internet Explorer, the video tag isn't on that list. This means that, if IE6 is any indication, developers will be forced to support Internet Explorer 7 & 8 for the next 8-10 years with an alternate means for displaying video. What is this alternate display technology? Flash of course!
Finally, working for a company which has invested a good chunk of time and resources into a customized Flash video player, rewriting it using HTML, CSS and JavaScript certainly isn't a top priority. Many video destination websites use additional functionality of the Flash player to provide other functionality which would be lost. Also, its worth considering how a HTML5 based video player can easily be embedded on other websites (newsflash: with difficulty!). Here we run into the same issues which also mean that Flash will remain the dominant format for advertising for the time being.
So whilst HTML5 video is a good idea, numerous reasons tend to make me think that Flash is still going to be the dominant formant for online video for many years to come.
As a developer, the challenges of ensuring compatibility and porting functionality just don't make it a viable prospect at the moment. Until these are addressed, Flash remains the technology of choice for me - I can use superior MP4 videos, and can write once and deploy anywhere.
So where does this leave the iPad and Apple's choice to exclude Adobe from the table?
I predict many application developers will move towards HTML5 rather than Flash - providing compatible versions of their applications. Will this hurt Adobe? Probably to some extent since they have sunk so much money into promoting Flash as a serious application development platform.
For content destinations such as YouTube, Vimeo and others, if they want iPhone/iPad users to consume their content then I would expect to see specific native applications - like what we already have for YouTube. Will this hurt Adobe? Not really.
Flash adverts will still be the bane of the web, developers will still use Flash for games and slideshows and restaurant menus. iPhone/iPad owners will still see lots of blue cubes.
Flash isn't going anywhere, though its usage may be shifting.
Apple isn't going to change its mind, just look at their track record. This decision isn't going to impact sales significantly one way or another.