WebAssembly and Blazor .NET, The future of Web
Have you ever dreamed of writing c#/java/any-language-of-choice code for the client-side development?
I like to introduce to an experimental project that was initiated by Steven Sanderson, The project was developed and moved to .NET Foundation.
So What!, well if you are a dot net developer and love C#, you can now write front-end code in C#! 😮 😮 yes that was my reaction too when I heard about it!
You might say Microsoft has done before by introducing Silverlight, that was almost the same thing. You could literally write C# code and use a plugin run it on your favorite browser. Silverlight is in a coma these days and was not the success Microsoft expected to be. The software market quickly turned around on having a plugin-based technology on the browser.
Here is the definition from webassembly.org:
WebAssembly CG members representing four browsers, Chrome, Edge, Firefox, and WebKit, have reached consensus that the design of the initial (MVP) WebAssembly API and binary format is complete to the extent that no further design work is possible without implementation experience and significant usage.
Sounds amazing that browsers can have the ability to deal with assembly, Actually, .NET presents an amazing perspective on that. No matter what language you use on .Net framework, the whole optimization process is then handled by the framework and as you might know this is done by Intermediate Language for .NET. Web Assembly.
First what does the name come from, it is all about Razor so the suffix ‘azor’ is from there and according to Steven Sanderson they add ‘Bla’ to sound better. Just like Razor that you use to combines HTML and C# for Browser. The idea is load .Net assembly while the page is loading, note the following picture:
As you can see these assemblies are downloaded by the browser and thanks to web assembly support the browser is able to compile C# code.