What is Silverlight and why do we need it?
It is becoming increasingly common to find a message suddenly appears on our screens, urging us to install Microsoft® Silverlight® when browsing through websites, and in particular, when we are visiting sites owned by Microsoft. But, many of us are still unsure what Silverlight is, why we need to install it just to look at websites, and how it can be used to enhance our own website content and take it to the next level in technological advancement.
Silverlight is a cross-platform, cross-browser, and cross-device free plug-in tool that provide .NET based media capabilities and lavish web-based interactive applications. Silverlight combines various technologies into one development platform, so that developers are able to select the programming language and specific tools that they require. It provides a perfect platform to develop both client-side internal interactive business applications for the web, iPhones and desktop. Another superb feature of Silverlight is that it is designed to complement already existing functionality by integrating seamlessly with any existing JavaScript or ASP.NET AJAX code.
For those of you who do not need to understand all the technical jargon about Silverlight, without it, you may miss out on the latest cutting edge user interface experiences that websites have to offer. For example, sites often opt to personalize their sites with the use of interviews and testimonials, and have used Silverlight to provide high-definition video streamed talks on demand.
As a web user, the best approach to make a decision about whether you need to install Silverlight would be to ask yourself if any of the sites that you visited at the moment require it. If the answer is no, then it may not be essential for you to install it on your desktop right now, although more and more sites are using it and there will be a time when it may become compulsory to have if you want to browse the Internet effectively.
There are other products on the market today that are in competition with Silverlight and can create similar effects, such as Adobe® Flash® and JavaFX®. So why would a developer choose to use Silverlight over other products? The answer is simple: You should use the product that caters for your environment and best suits your design and development requirements. The list of features included within Silverlight is exhaustive and there are many published articles available that cover the comparison of Silverlight with other products. But, as a starting point, here are a few of the main features that have been included in Release 4, that have not appeared in its comparable products to date:
-
Silverlight provides the same sandbox
environment on the user’s computer (commonly referred to as ‘offline’)
as within the browser. Unlike other applications that offer similar
functionality, Silverlight applications do not need elevated privileges
to be launched, therefore ensuring a more secure environment.
-
Silverlight addresses the constraints
of remote data access, whereby Ajax and Silverlight applications can
retrieve remote data that will be provided in the default JSON format.
-
Silverlight provides an SEO friendly
environment, allowing deep linking URLs to point directly to specific
places in an application. In addition to this, there is also an ASP
add-on that mirrors dynamic web content in HTML to allow simple
indexing.
-
It is now possible to administer 3D effects to absolutely any media objects using the new 3D API.
When Should You Use Silverlight?
There’s been a lot of talk recently about Silverlight – in particular comparisons to HTML (JavaScript/CSS). Unfortunately a lot of these comparisons come down a catfight over whether one is better than the other. The truth, of course, is that both have their place and the challenge is in fact deciding when to use one technology set over another.
Simone believes Silverlight is limited to desktop, Windows Phone 7 and niche extensions to traditional web applications. Despite his (IMHO false) assertion that HTML/JS/CSS can do almost as much as Silverlight (deserves a separate post to address this wildly inflated claim – come on Simone!) – I actually agree with his definition – however, I would further comment that the “desktop” is not the same as it was when we all wrote VB apps and installed them on our user’s (Windows only) desktops, one MSI at a time! The new desktop now covers, mobiles, televisions, Windows & Mac desktops, Xbox and are growing markets that Silverlight is in a great position to make an impact in.
So I decided to write down the scenarios that I believe might compel you to choose Silverlight. Not in any particular order,
- You need the power of the desktop but delivery of the web – historically the rise in popularity of HTML based applications was driven by the easy in which applications could be updated and distributed. Simply update a few files on your web server and auto-magically your clients had the latest version. Silverlight gives you this same power and in addition your users can control whether/when they upgrade. Technologies like MEF and Prism also allow you to modularize your applications to allow for selective downloads/upgrades depending on a user’s permissions.
- In fact, I’d argue that Silverlight out-of browser with elevated privileges is where it becomes a completely different beast to HTML applications. If also raises the question of when does Silverlight become WPF or perhaps more importantly when do we stop seeing them as different technologies and start talking about XAML applications that can target either the desktop or browser, share a common set of assemblies, but depending on the target can reference specialised enhancement assemblies.
- You’re building a graphics intensive application – kind of a no-brainer really. Sure you can use the newly supported canvas tag and some fancy JavaScript libraries but it’s a drop in the ocean to what’s possible in XAML and C#.
- Your application needs to operate outside the sandbox of the browser – there are some restrictions you simply can’t get round in the browser, primarily for security reasons. You can’t access information on a user’s computer, you can’t write to a user’s disk (other than cookies and HTML5 offline storage), you can’t access devices connected to your user’s machine – by running Silverlight out-of-browser and/or with elevated trust a lot of these restrictions are lifted.
- You need to interact with the device your application is running on – in addition to the comments above there are an increasing number of scenarios where your application needs to communicate with local devices. As mobiles, televisions and other devices become more important for business and consumers the applications that run on them need to be more and more advanced. You want to be able to integrate cameras, webcams, scanners, printers into your applications and the browser’s sandbox won’t allow this.
- Your application needs to stay alive – there are lots of examples of applications that need to keep running but are still connected to the internet – email clients, twitter, face-book and IM clients, monitoring applications (for say networks, stock prices...). These applications typically need to stay alive at all times and notify you when things change – like display a toast notification or give some audio feedback. While you can achieve some of these features in HTML I don’t know many people that would prefer to use a browser twitter client over a web based one – it’s just not the same.
Silverlight application is the best website development technology by micrsoft. it is very crazy in people for developing website in it.