News

Open Source Silverlight Replacement Powered by WebAssembly Debuts

Userware, on a years-long quest to bring back developer favorite Silverlight, announced an open source implementation of Microsoft's long-deprecated framework for writing Rich Internet Applications, this one based on WebAssembly.

WebAssembly offers a low-level assembly-like language to serve as a compilation target for higher-level languages so they can be used in web development instead of JavaScript. The technology underpins the client-side component (Blazor WebAssembly) of Microsoft's Blazor project -- part of ASP.NET Core -- which uses it as a target for C#-based .NET code.

Now Paris-based Userware is previewing an open source project that uses WebAssembly to bring back technology associated with Silverlight, a .NET-powered plug-in for interactive web and mobile applications that worked in all browsers and OSes. Although it enjoyed a devoted developer following, its plug-in approach also used by products like Adobe Flash fell out of favor and Microsoft decided to deprecate Silverlight years ago, with the final end of support scheduled for Oct. 12, 2021.

To fill the void, Silverlight devotees like the folks at Userware have been championing open source products, like C#/XAML for HTML5 (CSHTML5), which debuted in 2018 as a Visual Studio extension used to create HTML5 apps using only C# and XAML.

Userware worked on CSHTML5 for some six years and used its codebase to today (March 9) announce OpenSilver, an open-source reimplementation of Silverlight that can run on all browsers and all platforms, no plug-in needed.

Announced as a technology preview, OpenSilver's no-plug-in approach is enabled by the nascent WebAssembly project, version 1.0 of which has shipped in four major browsers.

"Since most browsers stopped supporting plug-ins such as Microsoft Silverlight, .NET developers found themselves without a way to build rich client-side applications that run in the browser," said Giovanni Albani, CEO of Userware, in a news release. "But with the advent of WebAssembly — an open standard that is now supported by most desktop and mobile browsers — this is no longer the case."

Userware says the OpenSilver technology preview supports about 60 percent of the Silverlight API, including most of the most common features.

Other highlights of the project include:

  • It relies solely on open standards.
  • It runs on both desktop and mobile web browsers.
  • It is compatible with .NET Standard, so the code can be shared between the client, the server, and other platforms.
  • It is compatible with JavaScript, so existing JavaScript libraries can be directly imported and used from C#.

Userware has published a gallery (source code here) powered by OpenSilver that includes examples and code snippets that can be used to build apps. The web application is written in C# and XAML and compiled to WebAssembly using OpenSilver.

OpenSilver Gallery
[Click on image for larger view.] OpenSilver Gallery (source: Userware).

While the web application loads slowly (even more so the first time), a banner says performance will improve by at least 30 times when ahead-of-time (AOT) compilation becomes available in the coming months for the project, which says it "uses Mono for WebAssembly and Microsoft Blazor."

"Significant performance improvements are also expected when the Mono team at Microsoft completes adding support for 'Ahead-of-Time' compilation, a feature that is also eagerly awaited by the Microsoft Blazor community," the company said. AOT is a hot topic in the .NET world. Just last month Uno Platform claimed an industry first and addressed a "long-time request" by announcing the capability to build WebAssembly apps in Visual Studio on Windows using AOT compilation. AOT is also coming in the unified .NET 5 shipping in November for iOS and client-side Blazor WebAssembly, the latter of which is finally debuting in May.

Going forward, the project's roadmap includes the following (in addition to those 30x performance gains enabled by AOT):

  • Features expected in 2020 include support for Open RIA Services and Telerik UI for Silverlight (note: a license from Telerik will be required).
  • OpenSilver will also be updated in sync with the latest Blazor and Mono for WASM projects.

OpenSilver's development is being carried out in GitHub, and its source code is available in the same repo as the company's previous CSHTML offering. Developers wanting to try out the free extension (OpenSilverVSIX) for Visual Studio 2019 can download it here.

"The Silverlight story does not end in 2021. Its story is just being written" Userware says.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events