Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

Benefits of Silverlight

Posted by Viral Sarvaiya on September 10, 2010

Naturally, Silverlight offers all of the same benefits of RIAs, but there are a few features that set it apart from other RIA solutions, including the following:

  • It offers cross-platform/cross-browser support.
  • It provides a cross-platform version of the .NET Framework.
  • XAML is a text-based markup language.
  • Silverlight uses familiar technologies.
  • Silverlight offers an Out of Browser and Full Trust option.
  • Silverlight is the main development platform for Windows Phone 7.
  • It’s easy to deploy the Silverlight runtime to clients.

Let’s take a closer look at each of these benefits.

Cross-Platform/Cross-Browser Support

When ASP.NET was released a number of years ago, one of the benefits touted was cross- browser support. Developers would need to have only one code base, and that code base would work in all modern browsers. For the most part, this is true. No matter which browser you are using, the application will function. However, in order to receive all of the bells and whistles offered by the ASP.NET controls, you must use the latest version of  Internet Explorer. If you are using any other browser, you actually get a downgraded version of the web site, which contains fewer features.

Validation controls are a prime example. If you are using a browser that ASP.NET recognizes as an “upscale” browser, you can take advantage of client-side validation. If you are using any other browser, the validation controls still function, but require a postback to the server to do the validation. So, although ASP.NET is cross-browser, users can get different experiences, depending on which browser they are using.

With Silverlight, this changes. Microsoft is once again pulling out the term cross-browser, and also adding cross-platform, and this time they mean it. As a developer, you can create a Silverlight application and rest assured that it will run exactly the same on all supported platforms and browsers.Currently, two platforms are supported. Naturally, the first is Windows-based platforms, and the second is Mac OS platforms. As for browser support, Internet Explorer, Firefox, Safari and Google Chrome are currently covered.

This leaves one large platform unsupported: Linux. Although Microsoft does not have plans to support Linux, others do. Moonlight is an open source implementation of Silverlight, targeted primarily at Linux based operating systems. Moonlight is part of the Mono project, an open source initiative to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Although Moonlight brings Silverlight features to Linux, the project lags behind the aggressive Microsoft release cycles. The latest version of Moonlight is version 3 Preview 6, which comes close to compatibility with Silverlight 3.

Cross-Platform Version of the .NET Framework

Silverlight 1.0 was released by Microsoft in the summer of 2007, but this version supported only Ecma languages that are interpreted in the client. Although Silverlight 1.0 works well for developers who are already familiar with client-side scripting, many developers have their eyes on the second release of Silverlight, version 2. Silverlight 1.0 is more or less in direct competition with Flash—some have called it Microsoft’s “Flash killer.” However, things really get exciting with Silverlight 2.

Silverlight 2 and beyond contains its own cross-platform version of the .NET Framework, which means it has its own version of the common language runtime (CLR), the full type system, and a .NET Framework  programming library that you can use in Visual Studio 2010 to build rich user experiences in the browser.

Use of Familiar Technologies

Microsoft is very good at creating tools that make application development easy. The Visual Studio integrated development environment (IDE) has been around for quite some time, and although new features are continually added to the tool, the environment itself has remained remarkably consistent. Silverlight development is no different. At the core of developing Silverlight applications is Visual Studio 2010, the latest version in Visual Studio’s long history. This gives Silverlight a distinct advantage, as developers do not need to learn how to use a new development environment. In addition to Visual Studio, Microsoft has a suite of tools called Expression Studio. Included in this suite is Microsoft Expression Blend, which is used to edit and create XAML for Silverlight applications. While Expression Blend looks completely different, it still has many of the same  elements as Visual Studio. In addition, Expression Blend works off of the same project as Visual Studio. This means that as you make changes in each of the editors—opening a project in Visual Studio, and then opening the  same project in Expression Blend to edit the XAML—the edited files will request to be refreshed when opened again in the other tool.

Small Runtime and Simple Deployment

Since Silverlight requires that a client runtime be installed on the client machine, it is vital that this runtime has a small footprint and downloads quickly. Microsoft worked very hard to get the installation size as small as possible. The developers clearly succeeded with Silverlight 1.0, as the download size is a tiny 1MB. For Silverlight 2, however, they had a harder chore ahead of them, since Silverlight 2 contains its own .NET Framework and object library. Microsoft went to each .NET Framework team and allocated it a size to fit its portion. The end result is astonishing—Silverlight 2 is approximately 4MB in size. In Silverlight 4, even with the large amount of new features that have been added to the Silverlight runtime, the file size is still less than 6MB.

As for pushing the Silverlight runtime out to clients, Microsoft has provided a very easy detection mechanism. If the client does not have the proper Silverlight runtime installed, it will display a logo of the Silverlight.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: