Microsoft Silverlight

Microsoft Silverlight is a web browser plugin that provides support for rich internet applications such as animation, vector graphics and audio-video playback. Silverlight competes with products such as Adobe Flash, Adobe Flex, Adobe Shockwave, JavaFX, and Apple QuickTime. Version 2.0 brought improved interactivity and support for .NET languages and development tools.

Silverlight was developed under the codename Windows Presentation Foundation/Everywhere (WPF/E). It is compatible with multiple web browser products used on Microsoft Windows and Mac OS X operating systems. Mobile devices, starting with Windows Mobile 6 and Symbian (Series 60) phones, will also be supported. A third-party free software implementation named Moonlight is under development to bring compatible functionality to GNU/Linux.

Silverlight provides a retained mode graphics system, similar to WPF and integrates multimedia, graphics, animations and interactivity into a single runtime. It is being designed to work in concert with XAML and is scriptable with JavaScript. XAML can be used for marking up the vector graphics and animations. Textual content created with Silverlight would be more searchable and indexable than that created with Flash as it is not compiled, but represented as text (XAML). Silverlight can also be used to create Windows Sidebar gadgets for Windows Vista.

Silverlight supports playback of WMV, WMA and MP3 media content across all supported browsers without requiring Windows Media Player, the Windows Media Player ActiveX control or Windows Media browser plugins. Because Windows Media Video 9 is an implementation of the SMPTE VC-1 standard, Silverlight also supports VC-1 video, though still only in an ASF file format. Furthermore, the Software license agreement says VC-1 is only licensed for the “personal and non-commercial use of a consumer”. Silverlight does not support playback of H.264 video.

Silverlight makes it possible to dynamically load XML content that can be manipulated through a DOM interface, a technique that is consistent with conventional Ajax techniques. Silverlight exposes a Downloader object which can be used to download content, like scripts, media assets or other data, as may be required by the application. With version 2.0, the programming logic can be written in any .NET language, including some common dynamic programming languages like Ruby and Python.

Microsoft Silverlight
Developed by Microsoft
Initial release April 2007
Stable release 1.0.30401.0 (08 April 2008) [+/−]
Preview release 2.0.30226.2 (5 March 2008) [+/−]
Written in combination of C++ and C#
OS Microsoft Windows,
Mac OS X
Genre Web Application framework
License MSEULA, with MS-PL components
Website Microsoft Silverlight
Silverlight.net

Compatibility

OS/Browser IE 6 SP1 IE 6 SV1 IE 7 IE 8 Firefox/SeaMonkey/Mozilla Safari Konqueror Opera
Windows Vista/2008 N/A N/A 1.0, 2.0 2.0 1.0, 2.0 1.0, 2.0; via NPAPI N/A Unofficially
Windows XP/2003/Home Server N/A 1.0, 2.0 1.0, 2.0 2.0 1.0, 2.0 1.0, 2.0; via NPAPI N/A Unofficially
Windows 2000 2.0 N/A N/A N/A 2.0 2.0; via NPAPI N/A Planned
Windows Mobile 6 1.0 N/A N/A N/A N/A N/A N/A N/A
Mac OS 10.4/10.5 PowerPC N/A N/A N/A N/A 1.0 1.0 N/A Planned
Mac OS 10.4/10.5 Intel N/A N/A N/A N/A 1.0, 2.0 1.0, 2.0 N/A Planned
Linux x86(Moonlight) N/A N/A N/A N/A Planned N/A Planned Planned
Linux x86-64(Moonlight) N/A N/A N/A N/A Planned N/A Planned Planned

Silverlight 1.0 consists of the core presentation framework, which is responsible for UI, interactivity and user input, basic UI controls, graphics and animation, media playback, DRM support, and DOM integration. It is made up of the following components:

  • Input – handling input from devices like keyboard, mouse, stylus etc.
  • UI core – managing rendering of bitmap images (including compressed raster images like JPEG), vector graphics, text and animations.
  • Media – playback of MP3, WMA Standard, WMV7, WMV8 and WMV9/VC-1 streams.
  • XAML – to allow the UI layout to be created using XAML markup language.

A Silverlight application starts by invoking the Silverlight control from the HTML page, which then loads up a XAML file. The XAML file contains a Canvas object, which acts as placeholder for other elements. Silverlight provides various geometrical primitives like lines, ellipses and other shapes, to elements like text, images, and media etc. The elements are properly positioned to achieve the desired layout. Any arbitrary shape can be created as well. These elements can be animated using Event triggers; some animation effects are predefined, others can be created as composite of the pre-defined effects. Events like keyboard or mouse movements can also raise Events which can be handled by custom scripts.

Programmatic manipulation of the UI is achieved by using scripting languages to modify the Document Object Model of the Silverlight Canvas object. To facilitate this, Silverlight exposes a DOM API, accessible from any scripting language supported by Silverlight, which in version 1.0 release is limited only to JavaScript running in the browser. However, there are no UI widgets built in. The native widgets of the browser must be overlaid on top of the Silverlight Canvas for user input. Support for data formats is limited to POX (Plain Old XML) and JSON only.

Silverlight 2 (previously referred to as version 1.1) includes a version of the .NET Framework, implementing the same full Common Language Runtime version as .NET Framework 3.0; so it can execute any .NET language including VB.NET and C# code. Unlike the CLR included with .NET Framework, multiple instances of the CoreCLR included in Silverlight can be hosted in one process. With this, the XAML layout markup file (.xaml file) can be augmented by code-behind code, written in any .NET language, which contains the programming logic. It can be used to programmatically manipulate both the Silverlight application and the HTML page which hosts the Silverlight control. The XAML markup as well as the code, is compiled into .NET assemblies which are then compressed using ZIP and stored in a .xap file.

Silverlight ships with a lightweight class library which features, among others, extensible controls, XML Web Services, networking components and LINQ APIs. This class library is a subset of and is considerably smaller than .NET Framework’s Base Class Library. Silverlight code runs in a sandbox which prevents invoking platform APIs.[23] Silverlight 2 also adds support for DRM in media files.

A set of Silverlight controls rendered with different skins

The version of .NET Framework in Silverlight adds a subset of WPF UI programming model, including support for shapes, documents, media and animation objects of WPF. However, the set of UI controls Silverlight ships with the alpha release is very limited, with no support for databinding. However, the Beta 1 release will add more than 20 UI controls (including TextBox, CheckBox, Slider, ScrollViewer, and Calendar controls, among others), add two-way databinding support, automated layout management (StackPanel, GridPanel etc) as well as data manipulation controls such as DataGrid and ListBox. UI controls are skinnable using a template-based approach. Third party libraries for expanded sets of UI controls are being made available for the alpha release as well.

A Python interpreter in Silverlight 2 hosted by Firefox.

Development tools

A Silverlight application being edited in Microsoft Visual Studio.

A Silverlight application being edited in Microsoft Visual Studio.

Silverlight applications can be written in any .NET programming language. As such, any development tools which can be used with .NET languages can work with Silverlight, provided they can target the Silverlight CoreCLR for hosting the application, instead of the .NET Framework CLR. Microsoft has positioned Microsoft Expression Blend versions 2.0 and 2.5 for designing the UI of Silverlight 1.0 and 2 applications respectively. Visual Studio 2008 can be used to develop and debug Silverlight applications. To create Silverlight projects and let the compiler target CoreCLR, Visual Studio 2008 requires the Silverlight Tools for Visual Studio which is available as a beta release.

A Silverlight project contains the Silverlight.js and CreateSilverlight.js files which initializes the Silverlight plugin for use in HTML pages, a XAML file for the UI, and code-behind files for the application code. Silverlight applications are debugged in a manner similar to ASP.NET applications. Visual Studio’s CLR Remote Cross Platform Debugging feature can be used to debug Silverlight applications running on a different platform as well.

For further information on Microsoft Silverlight, visit the following links: www.microsoft.com/silverlightor

http://en.wikipedia.org/wiki/Silverlight

Advertisements