Silverlight, out of browser web apps

This plugin from Microsoft for the production and presentation of rich Web applications is a source of great resentment from developers toward the firm. It actually allows for dazzling full interfaces, but all that one have learned to do this will become useless.

Silverlight offers to navigators the graphic features of WPF and which are of the same order as the ones of Flash, the plugin from Adobe.
- Make use of XAML,
- 2D vectorial graphics with scaling of objects.
- Works with Ajax thus JavaScript, DOM and XMLHttpRequest.

Silverlight also functions in local mode under the .NET environment. .

The project manager, Bob Muglia,  explained on the blog of Microsoft that Silverlight as a platform will be used mainly for running Windows Mobile Phone 7. 

Silverlight is now our development platform for Windows Phone. Our strategy has shifted. HTML is the only true cross-platform solution for everything, including IOS.

Then the strategy has yet shifted.

The future development of Windows is in XAML. Know-how with Silverlight applications remain valid with XAML + JavaScript.

Supported platforms are Windows since XP with SP2, Windows Phone, MacOS, Linux partially with Mono.

In a 2015 blog post about Edge, the Windows 10 browser, Microsoft announced its continued support to Silverlight, even if it does not work on Edge. Since then, Microsoft encourages developers to ditch Silverlight for HTML5.

In 2021, an independent version of Silverlight appears under the name OpenSilver, with support from Microsoft. We can continue to use a good part of the Silverlight code with this runtime written in WebAssembly.

The magic of Silverlight

HTML Integration

XAML

Vectorial graphics

Videos

Silverlight vs Flash

The Flash format of Adobe (formerly Macromedia) became a standard on the Web. It makes it possible to add graphic applications to the navigator, once downloaded the plugin. It is also used for Web applications, in particular by the Laszlo framework.
Microsoft hopes to replace it with a product adapted to modern technologies of the Web. It is also a plugin, but lighter and that runs on main navigators also.
However Flash runs under Linux while Microsoft provides only a runtime for Windows and Mac. Actually, a project of Silverlight for Linux, code-named Moonlight has been started on the Mono website. It is now discontinueed.

Silverlight is faster than Flash and also has the advantage of allowing development in several programming languages. But it does not work on all systems.

Silverlight vs. HTML 5

Microsoft has abandoned positioning Silverlight as an alternative to HTML 5,  that becomes a standard  platform for immersive applications on desktops or tablets. But it is a fragmented standard as it is supplemented by API interfaces to operating systems that are specific to each (See Tizen, Enyo in WebOS, etc.).

An essential part of Silverlight, XAML remains an alternative to HTML 5, it is much richer thanks to the quantity of tags for graphical user  interfaces et is take place in Metro. The plugin itself will remain operational for a long time but its value is limited.

Programming tools

To make an application with Silverlight Microsoft has created a set of tools called Expression, equivalent of the Creative Suite software from Adobe. It is no longer distributed. Visual Studio makes it possible to produce Silverlight applications too.
Silverlight's controls can be used in several ways: they are first defined with an OBJECT or EMBED tag, or a script, or loaded from an XAML file, or an XAML content is created dynamically. And once created they are used in JavaScript.
Visual Studio and Visual Web Developer Express integrate an IDE for Silverlight.

Eclipse has an extension to build Silverlight applications, Eclipse ESL. This includes a XAML editor with preview of the interface defined. This tool is now archived, it is no longer developed.

Visual Studio 10 takes into account in its GUI the new functions.

Evolution of Silverlight

Silverlight 2

Was released in final version on 14 October 2008.
This version included a subset of the .NET framework. A vocabulary of XAML has been defined specifically to make it easier for webmasters to achieve light applications online.
Silverlight Control Pack (SCP), is a system developed by Microsoft, which allows you to add new components for interfaces or backend of the platform. It helps to understand how the widgets operate in the system and interect with the implementation. It includes already DockPanel, viewbox, TreeView, Accordion and AutoComplete in addition to défault components: DataGrid, ListBox, Slider, ScrollViewer, Calendar and other controls.

Silverlight 3

Silverlight 3 added support to HD video and provided all the functionality to become a serious competitor to Adobe AIR. The final version was released on July 9, 2009... The runtime is just over 4 kb and is installed in seconds ...
This version still develops again videos features already added to Silverlight 2 to provide a better alternative to Flash.
Besides video, features are added to give a modern look to RIA are also a better access to data.

Allowing applications to run offline was implemented in Silverlight 3. This feature is also possible with Google Gears that allowed applications to work offline on a browser regardless of the operating system, and with HTML 5.
It seems that on an operating system which supports .NET, so Windows and MacOS, Silverlight 3 is in itself sufficient to run an application offline.
The application works within an environment with its own memory, without access to the file system, but with storage of its own data, in a database eventually.

Silverlight 4

More devices are supported: webcam, microphone, printer, mouse wheel. The major improvement is performance. Microsoft says that Silverlight application 4 runs three times faster than the previous version.

A print function available in Silverlight applications.

PrintDocument doc = new PrintDocument();  
doc.PrintPage += new EventHandler<PrintPageEventArgs>(doc_PrintPage);  
doc.Print();

Webcams and microphones are added to the list of devices controllable by a Silverlight application.

It is possible to save or generate locally videos or soundtracks. As an application, Microsoft cites the video conference allowing stations to communicate without using the server.

The mouse wheel is now better taken into account and can interface with the documents or lists of an application.
The value is assigned to the Delta attribute.

protected override void OnMouseWheel(MouseWheelEventArgs e)
{
    x = e.Delta;
   // use the value according to the application
}

The framework is now comprised of 60 widgets that you can customize.
RichTextBox is an editor that can handle links, embed images and controls.
The drag and drop works within an application between the components and also between the application and the local desktop.
It can transfer data to or from the application.

MyDocument files, MyPictures are accessed and other predefined locations in Windows to store documents.
Microsoft says that it works on other systems with different folder names.

The right mouse button can display a shortcut menu that is defined in the application.

Silverlight code once compiled can also work in a desktop application.

The "Managed Extensibility Framework" allows you to combine the object code written in different languages.

Silverlight 5

Available on December 9, 2011, it offers improvements to video and graphics with access to system functions through the  XNA game development platform. We remember that Microsoft has shown opposite WebGL because it allows such access to hardware.

See also: