Damian Edwards stayed at my house a week leading up to MIX09 and he’s had an amazing impact on our product teams whilst he stayed. One question he did provoke my way was what makes Silverlight better than JavaScript/HTML (forgot the actual wording but the meaning i walked away with was just that).

I could of given Damian the usual workflow, video codec's etc response that I'm sure many have heard umpteen times before. Instead I just deferred my answer and thought it over some more as I really hadn’t thought of the two being better than the other. In that, as a Product Manager for Silverlight to create a debate between these two approaches to the web is what we’d commonly label “breaking into jail”.

Getting back to basics

300ErniePyleTypewriter.jpgI instead spent a week or so getting back to my grass roots before I adopted Flash/Silverlight many years ago. I re-discovered some JavaScript & XHTML passion and have now become more aware of something in which i think can answer Damian’s question.

The simple answer above all is, that you’re working in a controlled environment. That’s why Silverlight could be a better fit and before you raise your jQuery swords and lead the charge against the arrogance of the few that which is plug-in’s let me ask you to pause ever so briefly and hear me out.

I’ve noticed that when I check “show errors” in browsers of my choice, I get a lot of various websites throwing a JavaScript error to the point in which it amazes me to no end why these continue to happen. It’s one thing for a random blog to have one but for major corporations, it’s simply just bad form.

On top of this, you have the browser related issues where if folks don’t do their homework with regards to CSS they can in turn cause a number of visual issues, resulting in a degraded experience (something Damian is quite vocal about and so he should be and agree with his arguments).

It’s my sandbox, I control all whom dwell in it

I think plug-ins in general provide a controlled state to play in, they aren’t perfect but their development workflows can enforce (via compile time / tooling) much stricter success criteria than JavaScript/HTML/CSS can provide today.  A team internally made a point of comparing their internal struggle with AJAX vs. Silverlight and came back with a lower bug count than they did before (admittedly it’s somewhat hard argument to push as a case and point, but it was interesting all the same).

Having absolute universal control over the XAML (DOM) and absolute pixel precession is definitely favored via plug-in, that being said it can still also be achieved with CSS / HTML (provided you’re skill set is capable of adhering to this).

To do this outside plug-in state, still requires a lot of trial and error when it comes to CSS production (jQuery though is technically brilliant at reducing some of this pain), as you’ll be adjusting everything from margins to padding along with injecting various DIV/SPAN tags to represent containers or inline elements that produce the visual result you’re after. 

Does this mean HTML is dead?

Dead Fred
€ 9,95Absolutely not. The web today is an amazing thing to behold when you think about it as JavaScript, HTML & CSS are simply the first language set that the world has collectively agreed upon. I honestly don’t think you’d ever get this decided in today’s software climate, so it’s a rare and beautiful thing to be apart of.

I still think however we’re clinging onto the few scraps of HTML we have today, and have noticed over the years many folks creating rules of engagement with these few tags – as if they were given to us as by our forefathers as being all that is great.

I simply think we’re holding onto them for the previously mentioned point, in that they are simply the first and probably the last agreed standard we’ve had all collectively blessed. I honestly don’t think when HTML was first drafted as a spec that we’d be seeing concepts like Virtual Earth or <insert your favorite AJAX / AJAJ > being used in the form it is today.

Hang on, scraps of HTML? you better explain yourself buddy.

That comment was sure to be a redflag, so let me explain in detail what i mean “Holding onto the scraps of HTML we have today”.

My theory is that HTML as we know it today, seems to be lacking in depth (probably why there is so much conflict with the language). I’ve seen over the past 10 years many arguments arise over the correct use of this blessed technology (I remember the famous <B> tag vs <Strong> argument. I also saw the DIV vs. LAYER tag war arise…) I’ve witness HTML’s birth from beginning to now, and I’m still yet to see anyone camp win over 2/3rds of the other.

Instead I think HTML/JavaScript/CSS & Plug-ins are going to have an interesting and exciting fusion with one another. I honestly don’t think anyone technique is miles ahead of the other as it will always depend on what you want to achieve, who is going to write it and what your intended quality control gates look like.

I vote for hybrid approaches for now, let’s just use both and evolve like we have been given today and explore in more depth what works vs.. what doesn’t.

In the end it’s all semantics and “it depends”.

You tell me what’s better and then tell me how Silverlight can improve. Please don’t beat me up, this ones just me thinking out loud after using both  approaches since 1995.

Note: I’m not a Product Manager of Internet Explorer and my influence there is probably less than yours all said and done.