Monday, April 12, 2010

Flash is dead, all hail HTML5?

I have never been a fan of Flash. While you can do pretty neat games or cool animations with it, most of the times it seems to be used to create some annoying blinking and flashing ad content. I don't like most of the full Flash sites either because they usually feel graphically bloated or unusable. Majority of full Flash sites are just simply poorly designed. Where credit is due however is YouTube and any other services providing video content.

Then again, HTML5 includes native support for video. Essentially this means that Flash is no longer needed for video. Out of the big players, YouTube was probably the first one to have an experimental HTML5 video support and very soon after Vimeo announced a beta HTML5 video player. In my eyes this indicates a clear willingness to go for more open web with no proprietary add-ons.

There is also a new Canvas element in HTML5 that allows dynamic 2D rendering via JavaScript. For some very good examples of this you can take a look at Canvas Demos or Chrome Experiments.

On top of that, WebGL will enable OpenGL ES 2.0 rendering through the very same Canvas element. Effectively this will mean hardware accelerated 3D graphics on your web page. So, there will be no need for Flash to do any animations. To see what WebGL is capable of doing I suggest you take a look at the WebGL demo running inside Firefox on the Nokia N900. There is even a JavaScript 3D engine using WebGL out there already called CopperLicht.

All the things mentioned above are enablers that allow open standards to close the gap between them and the add-on technologies. On the other hand, getting rid of Flash won't happen overnight. There are several reasons that are still holding back this transformation:
  • Internet Explorer doesn't support all HTML5 features and is likely to adopt these slower than other browsers.
  • The browser market will remain highly fragmented and there will be older versions of browsers around for a long time.
  • HTML5 is still a standard in progress and will take some time to get finished. It really might take several years to get it finished and deployed everywhere. At the same time proprietary technologies evolve all the time and are available now, not tomorrow.
  • The performance of JavaScript and Canvas doesn't match the performance of Flash and other native proprietary plug-ins.
  • Mozilla is sticking to their ideals and decided to not include the H.264 support into Firefox because of patent encumbrance issues. Unfortunately H.264 is widely adopted and for example the YouTube HTML5 support is using it.
Despite all these facts, recent news have shown that there is more intent to get rid of Flash. First of all, Apple changed the terms of the iPhone Developer Agreement so that it forbids any usage of third party tools for application development. This essentially is a death strike to Flash on iPhone, iPod Touch and iPad. Not very surprisingly, this really pissed some people off.

Secondly, soon after this Adobe presented a demo showing Flash CS5 exporting Flash content to a HTML5 Canvas. This is a very good move from Adobe and strengthens them where they have already been strong - the authoring tools. I was already hoping, among a lot of other people, for something like this to happen and now it is here!

The great thing about this is that it brings the authoring tools to the HTML5 family. I'm pretty sure some Flash puritans will argue that the exporting won't work properly, the performance will be poor and that the exported content won't be manageable. I'm going to disagree saying that I don't see why Adobe couldn't write all the required functionality in JavaScript. Furthermore, WebGL is going to bring the GPU acceleration for boosting performance.

As you could probably guess, I'm not expecting Flash to just disappear from the web anytime soon but at least here's to hoping now...