The most powerful, performant and easy-to-use UI framework is HTML with CSS and JavaScript. DirectX has extremely high development price and UWP is missing many features which are standard in CSS. Achilles heel of pure web development is JavaScript. When you use higher language compiled to JavaScript, one question arises – is JavaScript an efficient intermediate language? The answer is no, and the result is a web bytecode called WebAssembly.
JavaScript is inefficient and slow. New features in ECMA Script 6 were so complex that compilator optimizations for ECMA Script 5 were not applicable. Complex language also needs a complex compilator which consumes more computation power. It does not matter on PCs, but it matters on battery-powered devices. JavaScript is one of the most energy consuming components in a web page. For example, downloading and interpreting of JavaScript in the Wikipedia page takes about 30% of total energy needed to download and render whole page (source: Who Killed My Battery: Analyzing Mobile Browser Energy Consumption).
asm.js
One attempt how to return JavaScript compiler optimizations back was asm.js. It was research project at Mozilla that aimed to define optimizable, low-level subset of JavaScript. It was able to compile C++ code to JavaScript which could run with near to native performance. Browser detected optimized JavaScript code and used a specific compiler. JavaScript code was backward compatible with traditional compilers so support of other browser vendors was not necessary.
WebAssembly
WebAssembly is an enhancement of asm.js. It basically drops backward compatibility for higher performance. The browser executes a binary code which is designed for fast parsing and startup. The language is not dynamic, so it unlocks many fast CPU instructions. WebAssembly has been designed jointly by all major browser vendors, so it has wide agreement upon how to optimize it. On 5th December 2019 it became a W3C recommendation.
Blazor
Blazor is a .NET runtime able to run as a WebAssembly. Unlike Silverlight, it is based on HTML5 and DOM instead of XAML with a custom rendering engine. So which essentials it contains?
Blazor Compiler
Blazor Compiler transforms .razor files to C# code which could be compiled by vanilla C# compiler. The main difference between processing .cshtml and .razor files is that Blazor compiler is building a syntax tree which reflects DOM. It parses HTML and thus it requires well-formatted HTML.
Mono.net Runtime
One of .NET runtimes is Mono, which was ported to WebAssembly. It interprets .NET assemblies. In the future an ahead-of-time compilation might be supported because it is used by Xamarin.iOS and UWP. Vanilla C# compiler will support it with .NET 5.
Drive
Blazor has a potential to supersede Windows Forms, WPF, UWP and Xamarin Forms. It could be a major UI framework for all .NET applications. Well, almost – Console apps are immortal. Initial release of Blazor is scheduled on May 2020.