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 at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube