Don't Try to Reminplement HTML in your Rectangle of Joy

I recently signed up for the Bing Webmaster Tools and it prompted me to install Silverlight. I thought: "That's kind of weird... I'm pretty sure I've got Silverlight... I mean Netflix..." but I installed it, restarted my browser and... it prompted me to install Silverlight again. Okay, Silverlight doesn't work with the Firefox 4 beta, duely noted. It not working with a Firefox beta is legitimate legitimate. Even if someone in the depths of the bat-cave in Redmond has Silverlight binaries that work against the current Firefox betas, I can see not releasing them until it RC's. I get it, but it's still a lame user-experiance.

I switched to Chrome, and then the real page actually rendered. Good. I started pokeing around and land on a page with a scroll bar so I tried to scroll down... and nothing happened. I tried again, nothing. I looked closer. The scroll bars are wrong, text selection doesn't work, neither does Ctrl+Click, and the text is just wrong. It's kind of noisy. At this point that I realize that the whole page is Silverlight rather than just the graphs and fancy bits.

The Take Home Lesson

Don't try to make you're alien rectangle of joy do what HTML does.

The second you notice that you're headed down the road of implementing browser features in JavaScript, Flash, Silverlight or whatever, stop, turn around and start heading back, because here be dragons. Don't try to make this work. You're not going to get it right. Microsoft didn't get it right, and they have way more dudes than you. I'll grant you that HTML+CSS+JS might not be the most powerful client-app toolset ever imagined, I mean even getting certain things to even just line up can be a pain, and the siren song of a single place for documentation/tools must be alluring, but you're not going to get it right. Browsers do so much. They are huge pieces of software that that do all kinds of stuff and you're not going to be able to copy the behaviour people care about in any meaningful way (especially since there are ways that the browsers legitimately differ when it comes to things like "What happens when I right-click on a link?").

Play to the browsers' strengths. Laying out text? Linking pages togther? Use HTML. Save shelling out to your magical rectangle for things that browser's don't already do well (like rendering interactive 3-D environments :-). Even shelling out to Silverlight to draw graphs is kind of boarderline at this point because there are lots of tools for drawing charts with JavaScript+HTML at this point and they will almost certainly give you a better result.

Embrace your platform. Don't try to build around it, lest you end up re-implementing it poorly.