I have been asked this question a number of times in the past 2 weeks, and it is something I have posted about a little in the past https://andrewonedegree.wordpress.com/2010/02/04/abandon-flash-silverlight-for-html-5-no-way/ however, I think I need to clarify my position on this a little further and make it clear just what is the choice here…
HTML 5 and Silverlight 4 are very different “technologies” if you can call HTML a technology. HTML 5 is designed to bring a richer “environment” to websites, basically allowing it to do many things we have taken for granted with Flash and Silverlight, such as animations and the playback of video. However, apart from this, all three are quite different and have their own positives and I guess negatives.
So to answer the question, Silverlight 4 or HTML 5 you have to understand just what you are trying to do, and more importantly (at the moment) when you want to be able to do it…
No matter what your requirement, if you are looking to implement in the next 12 months, then HTML 5 is a no go. HTML 5 has been in development for over a decade now, and it is still a very long way off (well in terms of all its capabilities). Certain browsers have been shown to support HTML 5 in the next year, but this is just elements of HTML 5, not the full monty. All this means, if you want to enhance your website / business application with HTML 5, you are better off waiting for at least another year probably longer before you start evaluating its potential use. For many, this isn’t really an option, so it means a lot of the HTML 5 talk is nothing more than hype and fancy (alas this is true). So if you cannot wait that long, then I suggest you look at Silverlight.
However, that all being said, if you are thinking longer term, then let’s look at what you want, and if you should be looking at Silverlight x (by then) or HTML 5….
What you want?
If you are looking for just some animation, smoother interactions around the screen and video playback, then HTML 5 may well be the best option for you. This is where HTML 5 will make its mark, providing web users with better experiences. However, this is where HTML 5 capabilities also stop. You see, like HTML 4 currently, developers need more if you want to do more than just show content – they need the capabilities to integrate with web services, interrogate databases, perform calculations, apply business / user rules etc. To do all of this, developers use ASP.NET / PHP for example, which in turn has web pages formatted using HTML. With HTML 5, you are buying into this same architecture, with all its positives and negatives. Dont think that you just do everything in HTML 5, because this won’t be the case..
So when would you think about Silverlight 4? Well, if you want to do more in terms if a rich user experience, and or in terms of functions and capabilities then you will need a more powerful environment, that means managed code. Let’s just compare video for the moment. With HTML 5 we will have the capabilities of showing and playing video in the web browser. However, with Silverlight, you not only have this capability, but also the ability to do much more, such as rotate this, show a video on-top of another video, merge other content on the video, provide video links, add special effects, show video in other controls – the options are limitless….Now let’s take things further, away from simple video playback…What about providing real functionality, processing capabilities etc all things that are typically used for business based applications? Then you need something that provides a “proper” development environment….So Silverlight will for sure be your platform of choice….
Silverlight presents a different architecture in which to use. Applications are accessed across the web, yes, however they execute and run on the client PC, very similar in fashion to having an application installed on your machine via DVD. (The browser does not execute their code, it is simply used to “host” the Silverlight application). This means the application uses your PC processing power directly, it doesn’t need a browser to interpret its format or what it wants to do / show. In addition, Silverlight doesn’t need to rely (or keep talking too) the web server for all requests, many are executed / calculated there on the client machine. In addition, this also means that we can choose to run our application outside of the web browser, ensuring we are not limited to the limitations a browser places on our application. From a developer’s point of view, Silverlight is managed code, and runs on the .NET platform (which provides designers and developers with all the freedom they need to deliver applications that meet all requirements). From a business point of view, this means there are no restrictions on what you want to achieve with your application.
Its down to time and requirements. If you need something within the next 12-18months, then HTML 5 wont be for you. If however, you are looking for a “richer” environment that doesn’t need complex capabilities, application integration options and is really only used for displaying content across the web, then HTML 5 will be your choice. Finally, if you need to do more, such as provide business type functions and capabilities, then Silverlight 4 will be for you, or at least a mix of classic ASP.NET and Silverlight…..