Why We’re Going With HTML(5) Instead Of Silverlight

142 commentsWritten on March 6th, 2011 by
Categories: ASP.NET MVC, Silverlight

I recently had to research which UI technology would be the best choice for the applications that my client is going to build in the next couple of years. This is a .NET shop, so there are 2 major directions you could move into: standards-based web development, or Silverlight. When you have to recommend one over the other, you ideally want to be able to back up your choice with more than just some opinions. So we made a list of candidates and did a POC for each one. Then we came up with a list of criteria, grouped in a bunch of categories. The criteria were all assigned a weight, and we scored each of them for all candidates.

In this post, i want to go over the categories of criteria, and discuss our findings. I'm also going to share the spreadsheet so you can go through the numbers yourself. Depending on your needs or your opinions, you can change the weights and the scores and see how that affects the outcome. I removed some of the criteria that were specific to my client, but it didn't have a significant impact on the outcome. For this post, I also limited the candidates to ASP.NET MVC 3 in combination with the jQuery family (jQuery Core, jQuery UI and jQuery Mobile) and Silverlight.

Here's a quick listing of the categories and some of their criteria (for the actual list, check the spreadsheet... the link is at the end of the post):

  • User experience (compelling UI, accessibility, intuitive/ease-of-use, accessible from multiple devices, accessable from multiple platforms)
  • Infrastructure (easy/flexible deployment, monitorability)
  • Security (safe from XSS, CSRF)
  • Performance (server footprint, client-side resource usage, asynchronicity, UI responsiveness, initial load times)
  • Code/Architecture (maturity, reusability of validation logic, simplicity, maintainability, flexibility, power, testability, i18n, feedback cycle, learning curve, potential efficiency, rapid application prototyping, readable URLs, extensibility)
  • People (limits the number of required skills, mindshare, documentation, community support, commercial support)
  • Strategic (future-proof, standards-compliant, differentiator, backing, vision)
  • License (do we have access to the code?)
  • Cost
  • Tools (IDE support, availability of extra tools, free 3rd party component availability, commercial 3rd party component availability

Depending on what you or your organization requires, some of these might not apply to you. Perhaps there are other criteria that you find important and that we missed. Nevertheless, i think this is a pretty comprehensive list which covers most of the factors that you need to think about when making this kind of decision.

This graph visualizes how both technologies scored, grouped by category:

I'm sure there are quite a few things about that image that surprise you. The first thing you might be thinking is "how can Silverlight score so badly when it comes to User Experience?". The answer to that is quite simple: if your users aren't using a desktop/laptop with Windows or OS X on it, there is no experience to be had at all. Users that require assistive technology are out of luck as well since accessibility support in Silverlight is still very poor. If you hold those factors into account, it really doesn't matter much that you can easily make Silverlight applications incredibly flashy (pardon the pun). Besides, most people get bored and annoyed with excessive animations rather quickly, so you're often better off not to overdo it. With that in mind, jQuery UI and HTML5 will easily meet your needs for that kind of stuff.

Another area where Silverlight scores very poorly is the strategic department. The fact that it's not standards-compliant obviously hurts a lot here, but there's more to it than that. First of all, the mobile story (again) pretty much kills it. Android and iOS don't support it. We already know it's never going to work on iOS and as long as it doesn't work on iOS, Android has no reason whatsoever to provide support because Silverlight simply isn't important in the grand scheme of things to any of the important players. Microsoft hasn't even announced a Silverlight browser plugin for WP7 yet and who knows if it will? That means that Silverlight web applications aren't usable on any mobile device right now, except for slates running a full Windows OS which looks like its only a tiny portion of the market. Secondly, despite its original tagline of "Lighting up the web", it appears that Microsoft only has about 3 scenario's in mind where it still actively pushes Silverlight: internal business applications, video streaming and native WP7 development. While internal business applications are certainly a large part of what we're going to do in the next couple of years, we're also going to build things that are available publicly and to a large variety of people. Going with Silverlight for the internal applications and HTML(5) for the public-facing applications wouldn't be very cost-efficient either since that means we have to train our developers for both cases. And it wouldn't make much sense anyway since HTML(5) is a great fit for internal business apps as well.

But, as you can see, there are areas where Silverlight scores better than ASP.NET MVC 3 with jQuery. For instance, when it comes to Tools, you can't deny the fact that Visual Studio and Blend cover a lot of ground when it comes to the whole Silverlight developer experience. At the very least, you can mostly stick to your familiar integrated environment, whereas with standards-based web development, you're likely to spend some time in Firebug or Google Chrome's developer tools instead of sticking almost entirely with Visual Studio. I personally don't mind (at all actually) to use other tools than Visual Studio, but there are quite a few .NET developers who do prefer to stick with Visual Studio. Which brings me to the People category. The biggest benefit that Silverlight has over standards-based web development is that you only need to know C# and XAML. With standards-based web development, you have to know HTML, CSS, JavaScript and the language of your server-side technology, in this case also C#. This might impact your ability to find new developers so Silverlight does have sort of an advantage there. Though i'd argue that you're better off in the long term with people who are willing to step out of their comfort zone instead of clinging to what they know. From a security point of view, Silverlight also scores better because you don't really have to worry about common issues such as XSS, CSRF and other vulnerabilities that are common in web-development.

So we have 3 categories where Silverlight scores better than ASP.NET MVC3/jQuery but that's far from sufficient to close the gap. Based on the weights we assigned to the criteria, the maximum possible score is 732. ASP.NET MVC3 with jQuery scored 568. Silverlight scored 304. Obviously, the results will vary depending on what you find important. Which is why we asked an analyst from one of those large IT research & advisory companies to give us some feedback on this. The analyst agreed entirely with our findings and our data, and confirmed that his company is recommending moving towards HTML5 to all of their customers. He even went as far as to say that Silverlight is hard to recommend, unless you're not targeting any mobile users and the applications are internal-only and you've already invested in the technology. I can't provide a link for any of this yet, but a paper about this will be published soon so i'll either link to it when it's out (if it's publicly available) or at least reference it.

I encourage anyone who is faced with the same decision to use the spreadsheet and modify it to your needs (adding more criteria, changing weights and/or scores, whatever) to see which one is the best fit for your situation. You can download the spreadsheet here.

  • Pingback: Silverlight vs HTML (or how to fiddle the numbers) » Stuff for Geeks

  • http://jvance.com/ JarrettV

    Wow, great post. It isn’t often you get to see someone’s research on such a subject. Thanks for sharing. HTML5 is the future… however HTML4, jQuery, CSS, and MVC3 can today make very compelling easy to maintain web applications. I know because we are doing it today. If we only had to support IE9, FF, Chrome, Safari, life would be great. But IE7… #@%*! I digress.

    The comments on this post read like a fanboy iphone/android flamewar. Hilarious.

  • Pingback: the rasx() context » Blog Archive » “You Really Should Be Using NuGet” and other links…

  • Serware

    I believe you ignore all about Silverlight or HTML5 (probably both)

  • Anonymous

    I have a project that is struggling with similar decisions.

    Silverlight unlikely to hit Android or iOS in the next 12-24 months – I can’t see how a move it would benefit Microsoft financially as DevDiv is smaller on the revenue front than OS/apps. It doesn’t make a compelling user experience story to have one app design across all devices either – any framework that has been released that has promised cross-platform native applications has seen either little uptake or resulted in ugly apps that don’t feel right on the target device. Web apps are the exception in my mind because you have a different set of expectations when using the web. I’m not expecting that a web app will respond to tap-and-hold on a WP7 device or a scroll-wheel click on a Blackberry.

    Silverlight as a stop-gap for IE6/7 in the Enterprise – Where Silverlight does make sense for me is solving the IE6-8 problem. Large organizations that will not be upgrading from IE6 in the next 2-3 years write big cheques and Silverlight might help me bridge a gap until we see modern browsers become common place in the enterprise space. The question is if there are enough returns on that investment to make it work it.

    Given the much needed progression on the web side of things maybe it makes sense to bundle Google Chrome as an application shell that is deployed in a similar manner to Silverlight / Air applications.

    • http://twitter.com/Encosia Dave Ward

      Chrome Frame is a good solution to the IE problem in corporate environments.  If they can install a browser plugin anyway (i.e. Silverlight), they might as well install one that allows you to use HTML5/CSS3 and target a wider range of devices.

  • fred

     I think you’re wrong. In the future people will be looking for a user interface specifically targeting the device they are using (touch-screen, small/big screen, mouse&keyboard). They will get that app from their device’s AppStore, people just expect a far richer and visually complex user interface nowadays. Trying to write a single user interface to run on all devices will mean that you fall between all the stools.

    Actually the first thing which occurred to me was how on earth you could give a Web 2.0 app 90% for user experience? I guess it depends how long you think people will be using this application. Do you use any Web 2.0 applications for > 6 hours a day? it’s just not fun. 

  • Pingback: Yet Another Nail In Silverlight’s Coffin?

  • http://www.facebook.com/masilver Michael Silver

    Honestly, Silverlight is dead.  It may fit a few niche markets very well, like intranets, video, etc, but you still shouldn’t use dead (or soon to be dead) technology for future development, unless there are no other options.  Silverlight was an attempt to fend off Flash and thanks to Apple and HTML5, Flash’s relevance is greatly diminishing.  Similar to J#, which was part of a panicked attempt to fend off Java and lock people to the windows platform (I think .NET was wildly successful at this, BTW).

    I don’t think ASP.NET MVC/JS/jQuery is the ideal platform, but that’s irrelevant.  It’s the future, like it or not.  Microsoft realizes this, so does Google.  It’s also much improved, and will continue to improve at a greater rate than SL.At my company, we are straddled with ActiveX controls and Silverlight is really ActiveX 2.0.  Companies should avoid using SL internally, otherwise they lock themselves into obsolescence, which in 5-10 years will result in high maintenance costs.

  • Sl25

    Poor comparison of HTML5 vs Silverlight as it assumes the criteria for each project is essentially the same.  Performance, architecture and user experience are all winners for Silverlight IMHO  (Try getting a data grid as good as Silverlight without using x number of JS frameworks and plug-ins, or an HTML5 version of PivotViewer with DeepZoom).  If your developing an app where you want maximum reach then of course HTML5 is the tool of choice why even do a fancy chart and penalise Silverlight in UX for it not being on iOS, you may as well add a category called ‘Not a plugin’ and give SL a 0% for that as well.  We use Silverlight and HTML5 and think both technologies are great, its simply about being able to choose the right tool for the job.  In most cases HTML5 is now perhaps the stronger contender but poor one for all comparisons like this don’t give Silverlight the credit it deserves.

  • http://www.facebook.com/maheshkumarvk Mahesh Kumar

    This is one of the coolest assessment I have seen.

  • Pingback: Windows 8: HTML5 and AJAX/JavaScript == Modern UIs: HTML5, AJAX/JavaScript/jQuery - Technology | Zeytin.Net

  • http://pulse.yahoo.com/_TE3BHSQWXBCJH5SIVT5EEEHP2E DavidW

    Migrating all my Silverlight code to html/css/javascript right now due to bad experience with mobile phones, IPADs, etc.

  • Btayho

    I
    feel bad for Barns and Nobles, they have to burn those Silver light books now….
    Learn Silverlight in 24 HRS or Silver Light for Dummies

  • Murali

    good one…indeed I am tasked with a similar analysis in my org! you made my job lot easier, except I have to change few weights.

  • http://profiles.google.com/lilianftp Moraru Lilian

    Why would someone use Silverlight, really?

  • Craig

    To Davy Brion and Pete Brown. Having read through the article and comments your arguments and opinions were of particular interest. Davy it’s your blog (which we like) and Pete we have your book Silverlight 4 in Action (which we like) adding more value to both of your thoughts. Would you both mind commenting further now that 8 months has passed since the article was originally posted? I believe you are both open to each technology and genuinely recognise the advantages and disadvantages of each. Having said this I don’t think it would be unfair to suggest there is a slight personal preference (Davy: HTML5 and Pete: Silverlight) but this makes for interesting debate.
    I am asking on behalf of a small development team who have been struggling to make a decision between Silverlight and HTML5 (most likely in conjunction with ASP.NET MVC3 and jQuery) for the best part of a year. If I could also add a little more about our situation to the debate to better explain our indecision. We have a mature LOB application which is used internally and externally. It started life as a classic ASP website. We then moved to Windows Forms and it is distributed via ClickOnce (retaining with the odd bit of classic ASP launched in browser which works perfectly well and never got converted). We are lucky to have most of the original team who between them know the application extremely well. The application however is starting to show signs of age in terms of user experience, development technique, and perhaps most crucially due to some very rapid development it has a rather unhealthy mix of UI and business logic mashed together hurting its maintainability. From a business and technology point of view it makes sense to take what we have learnt and invented and to make it better whilst taking advantage of what new technology has to offer.
    A year ago we were pretty much in the Silverlight camp. Mainly because we really like the technology, the tools, overall our existing skill set probably fits better, and generally we prefer the thick client style of development vs the intricacies of web based development (e.g. managing state, browser differences, mastering multiple technology streams).
    Fortunately (in a way) due to business priorities we were delayed in starting the project leaving us to debate the choice further. More recently the future of Silverlight feels very bleak as does the future of other plug-in based web solutions (with Adobe’s recent announcement about the future of Flash on mobile platforms disturbing us further). I did some work with Adobe Flex a few years ago and again I really like the technology so I am not against it at all. We were expecting Silverlight to be treated as a core technology in Windows 8 for instance. That it isn’t also hasn’t helped. The focus seems to have gone with Microsoft trying to find a niche or somewhere to shoehorn Silverlight temporarily until it dies quietly. Which is a real shame as it probably would have been perfect for us. The reality is though that we can’t advise our company to invest a huge amount of resource and trust the future of its key system to something which feels dead. I don’t like to spread rumours but we have also had contact with someone who had direct contact with the WPF/Silverlight team and was adamant that resources and priorities had shifted internally. We tried to get in contact to verify directly ourselves but no luck.
    Also it is becoming more evident to us that different computing platforms are gaining adoption with users asking to use devices other than Windows. We simply can’t stick to the desktop like 5+ years ago and whilst there are different versions of the Silverlight plug-in for different platforms they no longer cover enough (IOS and Android in particular). We are too small a team to build and maintain multiple native versions for different platforms. There will more than likely be a different front end for desktop, tablet, and mobiles and we are under no illusions that different browsers are going to cause us headaches. I also have a personal dislike for JavaScript and we are all facing a huge learning curve but despite this it’s about choosing the right tools for the job. The decision isn’t final yet but Silverlight sadly no longer looks like to be a viable option.

    • http://davybrion.com Davy Brion

      Hi Craig,

      I wouldn’t recommend Silverlight for anything anymore… It literally doesn’t have a future anymore IMO. You can read more about my thoughts on it here: http://davybrion.com/blog/2011/11/silverlights-broken-promise/

  • Asdf

    Sorry but I Totally disagree on your assessment to user experience. Silverlight looks and feels way more awesome than any interpreted Markup shit can ever look like. And the fact that 80% of the computers are Windows or Mac systems makes this assesment simply wrong and missleading

  • Pat Tormey

    OK So who are WE in your title?
    For YOU this might be great. But I need all the tools in the toobox.

    Given that you are only supporting browsers and you want to build content to the least common denominator, and the browser sandbox is good enough, HTML will do just fine, as it always has.

    Personally I cannot think why you’d want to close any doors.. It’s only about the UI. Right tool for the right job and all that..Pat NH USA

  • Pingback: Read Later | Pearltrees

  • TBoen

    I missed
    productivity comparison developing web application with html5 versus Silverlight

    Facts:

    1. HTML5 is
    not a standard.

    2. Not all
    html5 elements are available in the current html5 supported browsers

    3. The same
    html5 elements behaves differently in the current html5 supported browsers

    4. In general:
    more tools you need for development the more error prone and difficult to debug
    your project.   Html5 consists of html, java script lib(s), css and server side
    language.  Conclusion developing html5 is
    more error prone and difficult to debug. And it becomes worser because of
    browser differences.

    5. If you want
    to develop an html5 application that behaves on the current browsers you end up
    using the common denominator of the html5 functions/elements available. Your
    code becomes cluttered with a lot of IFF’S conditions for checking browser
    support!

    6. You spent a
    lot more time on testing for different browsers

    7. NO WYSIWYG
    development environment?

    8. HTML5 is
    not a RAD development environment -> more time thus more money to develop an
    html5 application. Also more time for maintenance (for example: you need continuously
    test your app with browserupdates) -> $$$

    9. JavaScript
    code is by default not obfuscated

    10. JavaScript
    code is easier to hack -> security risk higher

    Microsoft
    is betting on a limp horse! The competition are laughing that they succeed that
    Microsoft bite the bone they are offering. No way google will leave android or
    apple objective C as their main development environment! If you are old you can
    have a plastic surgery to polish you up but your internal body organs are still
    old.. The same with html5 development!