I watched a video from MIX 2011 called âHTML5 for Silverlight Developersâ last night and it was very compelling. I was all on-board. I would prefer to not code things in Silverlight and give my clients the caveatââbut it wonât work on an iPadâ. So, I whipped out Visual Studio and started to code.
There is something very cool about being able to code something and not have to wonder if they client has Silverlight installed. This was awesome.
Except . . . nothing works in a browser below IE9 or Chrome or Firefox or whatever. IE6 through IE8 didnât work at all.
I myself am a Chrome user and gave up IE long ago unless a contract requires that I use it. But most corporate environments are a long way from upgrading to IE 8, let alone the latest IE9.
After doing some googling, I found the HTML5 shim which allows things to render properly in IE and the ExplorerCanvas javascript plugin to allow using the canvas in IE. So, there are work-arounds. However, these plugins allowed me to do basic things in IE8âbut failed in other areas. For example, with these plugins I could draw a rectangle on the canvas in IE8âbut I couldnât implement the drag/drop interface.
At one point, I had 5 different browsers open and was refreshing each one after making a change to my html. Ever time, at least one of them failed. If I tried to cater for a quirk in IE, Chrome would stop working. When I got it working in Chrome, IE would give an ugly javascript error.
But this is nothing new.
Back in 1999, I bought an big Microsoft book called âDynamic HTMLâ which espoused DHTML as the future of the web. It gave loads of examples on how to create animations and include very cool stuff in your pages. DHTML was term used by Netscape and IE, but this book focused entirely on Internet Explorer. When you tried to run your same code in the counterpart Netscape browsers, nothing rendered at all and you ended up with javascript errors. The book got around the cross-browser difficulties by ignoring all other browsers. If you worked in a corporate environment and would never code on anything but Internet Explorer, DHTML (or the Microsoft version of it) was great.
DHTML was a broad term (as is HTML 5) and doesnât belong to company. You code to a certain specification and each browser (or device) renders that as they see fit. You have very little control over how it will look unless you code with a plugin like Flash (and now, Silverlight).
I have seen fantastic DHTML animations in IE which only worked in IE. I can remember seeing stunning animations in Netscape which didnât work in IE (all using âlayerâ tags). I remember last year seeing a cool Arcade Fire video in HTML 5 which worked great in Chrome but not in IE. There is still no consistency here.
The âHTML5 for Silverlight developersâ video was a lot like the DHTML book. It looks great until you dig deeper.
The reason Iâm hesitant to jump on the HTML5 bandwagon (and I reeeallly want to) is Internet Explorers slow adoption of it. Actually, itâs not Internet Explorerâsince they are implementing a lot of new features in IE9, but most corporate environments wonât take up the new browser for at least one or two years. So, if you put something on the web, you have to think about the large amount of lunchtime surfers who wonât even be able to see your page. You need to write loads of conditional code just to make sure your down-level browsers can even see a message saying âNot supported by your browserâ instead of a javascript âErrors in pageâ popup.
One thing you should never ask your clients is âWhat browser versions do you want this to support?â The answer is always the sameââWell, all of them.â This is why the IE-only inventions of the past (HTML+Time, background filters, etc) never took off. This is why a lot of the HTML5 featuresâas cool as they areâwonât take off either. We Chrome users donât carry enough weight yet to move the entire world to the newer code. If Apple had allowed Flash on the iPad, I donât think anyone would care about HTML5 at all.
I want to be converted and go back to plug-in-less web development. But so far, HTML5 (or rather, the browser creators) have let us down.