Silverlight, Flash/AIR or HTML5?

update 1: data access and streaming details added with input from Ian in comments!

update 2: HTML 5 offline and local storage added with input from Simone in comments!

update 3: Ars Technica has a discussion around the complicated issue of finding a common codec.

update 4: a more technical comparison is available here.

It’s often argued that on the web, you can either achieve high reach or richness, but not both. By reach, they mean the number of users who can access the content on your website. On the other hand, by richness, they mean the overall experience in the presentation of the content. This worldview presents a dichotomy where none actually exists. It’s very tempting theory but I believe that it’s a mis-application of the Reach vs Richness theory in the browser space.

Firstly, Flash has attained ubiquity on virtually all browsers (except mobile devices but Flash 10 is coming to Android, Symbian, Windows Mobile and WebOS). The claim that rich user experience is at odds with having to do everything with HTML and JavaScript is an uninformed one.

They argue that you have no choice but to rely on proprietary plug-ins that are inherently non-ubiquitous. Also Flash and Silverlight are both proprietary plug-ins. Modus ponens,  there is no way to deliver richness unless you require users to install Flash or Silverlight. Of course, we know this isn’t true. Flash has already been installed and Silverlight is just something new that’s trying to gain market share. There are some statistics referring to a 25% penetration rate.

That argument aside, the recent news about the emergence of HTML 5 and how it might obviate the need for browser plug-ins have got the developer world boiling. Despite the fact that it’s still a standard in the works, it aims to fill many gaps that are traditionally missing from HTML and JavaScript. In addition, being an industry standard means it has a much higher chance of reaching ubiquity, provided browser vendors do not intentionally create obstacles. In fact, Opera 10 already partially supports HTML5. So are Firefox 3.5, Chrome and Safari. The only guy late to the party is, of course, Internet Explorer.

Let’s explore the feature set to see how HTML5 stacks against Silverlight and Flash/AIR.

Silverlight Flash/AIR HTML 5
MP3, AAC, WMA, WMV, VC-1, H.264 with DRM support MP3, MP4, M4V, M4A, 3GP, MOV, VP6 , H.264, Speex, with DRM support Fragmented: Ogg theora and H.264
new
XAML MXML HTML/XHTML
C#/VB/IronPython/IronRuby ActionScript JavaScript
UI Controls UI Controls Rudimentary UI Controls with 3rd party tools like jQuery UI
GPU rendering with Bit Map Caching. Software-only HLSL Pixel Shader 2.0, no vertex shader GPU compositing.  Shading effects created using Pixel Blender processed by GPU. No GPU processing, pixel shader
Offline mode AIR is the offline mode Offline HTTP Cache
Isolated local storage SQLite support for local storage in AIR Native web storage
Data access over WCF, POX and ADO.NET data services, TCP sockets Data access over web services, LiveCycle Data Services, BlazeDS and TCP sockets Data access over JSON
MMS, RTSP, RTSPT, HTTP Streaming RTMP, RTMFP, HTTP Streaming Open web socket but not real time streaming