|OpenSilver - Silverlight Reborn?|
|Written by Mike James|
|Wednesday, 11 March 2020|
There are many programmers who regret the passing of Silverlight - it was a great idea. Could it be that modern technology can bring it back from the dead? OpenSilver is an open source attempt at doing just that.
Back in the day Silverlight was a small miracle. You could write Windows code in C# and essentially run it in the browser with, usually, no modifications. It was also the basis for the first generation of the Windows phone which made mobile coding particularly simple. Then, for reasons of insanity, the whole Windows 8 and WinRT based Windows Phone happened and Silverlight was dumped. It wasn't just deprecated in the manner of so much Microsoft code and left to slowly rot. As it was an alternative, a better alternative, to WinRT and hence a threat to the adoption of the new ways of doing things, it had to be stamped on and removed from the universe. This was helped along by the fact that it was a plug-in and browser add-ins were clearly evil - just look at what happened to Flash.
Now that the dust has settled and Windows 8 and Windows Phone are both just bad memories, there has been no official reprieve for Silverlight and, given that browser plug-ins are still regarded as toxic, there isn't likely to be one.
With legacy Silverlight apps facing a big problem with the end of support in October 2021, maybe OpenSilver can save the day. It might be cheaper than rewriting in a new technology.
OpenSilver is a Visual Studio extension that lets you open a new project and run it either in a simulator or using a webserver in a browser. It works with Visual Studio Community edition so you can give it a try for free. I tried it out and found that a bit rough around the edges, with things not quite working out of the box - nothing I couldn't fix in a few minutes. However, when I tried to get some of my old Silverlight programs working, I failed. I made progress, but did not get to the point where I could run something. The reason seems to be that my programs are generally "advanced" examples that make use of high resolution graphics within WPF. For example, I couldn't get WriteableBitmap or any of its associated classes to work. It is claimed that OpenSilver supports 60% of the Silverlight API, but I couldn't find a list of what is or is not supported.
If you really do need to port an existing app, then the company behind OpenSilver is offering a migration service that will presumably provide it some income to keep the whole project going as well as.
I also have to agree with the press release that currently OpenSilver is slow. It promises a much faster performance later in the year when Microsoft adds support for Ahead-of-time compilation.
Given that there isn't a drag-and-drop designer for OpenSilver's XAML and documentation is mostly non-existent, this isn't a beginner's option. If you know Silverlight and are capable of manually editing XAML, you will probably manage to get your old apps working - but my guess is you are going to be lucky if it turns out to be trivial.
The mission statement is worth quoting:
“We are .NET developers who believe that Silverlight was the best platform ever for developing lineof-business (LOB) applications. We are sad to see Silverlight die due to the lack of support for plugins in modern browsers, so we want to save it by reimplementing it using modern, open, and standards-based technologies. We want to make it even more awesome than before, so that developers have the tools to build amazing products that can change the world.”
I think the task of making it as good as it was before is a fairly tough one, let alone making more awesome, but I hope I'm wrong. If you feel like helping there is a GitHub repro.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Wednesday, 11 March 2020 )|