News

Missing Silverlight and Waiting for Blazor? CSHTML5 for C# Web Development Goes Open Source

Microsoft's experimental Blazor project to allow .NET coding for Web projects via experimental WebAssembly may be getting all the attention, but new open source tooling does something similar, acting like a bridge between the death of Silverlight and the production readiness of WebAssembly.

It's called CSHTML5 (or C#/XAML for HTML5), and it's developed by French company Userware, which has worked on the technology for some five years. Previously available as a Visual Studio extension available in the IDE's marketplace, it's also available for download.

Now on GitHub, the project is described as "the first production-ready solution to make Web apps in C# and XAML. It is also the only tool that enables to port existing Silverlight and WPF applications to the Web, by compiling C# and XAML files to HTML and JavaScript."

Microsoft Silverlight, a darling product sorely missed by many developers, is a now-deprecated application framework used for rich Internet applications via the plug-in approach, similar to Adobe Flash.

"We support the transition between the end of Silverlight, and the arrival of WebAssembly, so that C# and XAML devs will not have to use HTML5 or JavaScript while waiting for WebAssembly, Userware's Killian Leclercq told Visual Studio Magazine last year.

 CSHTML5 (C#/XAML for HTML5)
[Click on image for larger view.] CSHTML5 (C#/XAML for HTML5) (source: Userware).

In announcing an update last May, the company said it was keeping an eye on the promising Blazor project. "We have also been working on different proof-of-concepts lately, experimenting with the possible integration of Blazor/WebAssembly and Bridge.NET technologies into CSHTML5," Userware said. Bridge.NET is an open source C#-to-JavaScript compiler and frameworks that also allows for C# apps to be run in Web browsers. Bridge.NET has since been incorporated into the upcoming v2.0 release, providing generated JavaScript code that's said to be very close to the original C#, while also being almost as readable as hand-written code.

With yesterday's announcement that CSHTML5 has been updated and donated to the open source community, that Blazor integration was again mentioned.

The company plans to release a WebAssembly-compatible version of CSHTML5 interoperable with Blazor late this year or early in 2020. "In the future, you won't even need to compile to JavaScript because your C#/XAML app will run natively in the binary form," said CEO Giovanni Albani.

In addition to the open source move, Userware announced a new Community Edition that provides previously for-pay features to hobbyists, open source projects and academics, along with commercial licenses available under a dual-license model.

Also announced was the new version. CSHTML5 1.2, with more than 40 new features and numerous bug fixes.

Userware also provides a Migration Edition specifically for developers wanting to migrate their existing Silverlight or Windows Presentation Foundation (WPF) projects to the platform. More details, including licensing and pricing for the paid options, are available here.

According to the project's roadmap, initial support for third-party JavaScript libraries such as Telerik Kendo UI and Syncfusion Essential JS is planned, along with an improved "Live Demos" showcase application and a Material Design styles kit, all scheduled for next month.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube