DEV Community

John Peters
John Peters

Posted on • Updated on

WASM : The End of Javascript?

Microsoft has been working on WASM for a long time now. Their project named Blazor was doing well back in 2019 with its precursor Razor going back to at least 2014.

I initially rejected Blazor thinking Javascript and JS packages are so dominant that the same type of Open Source collaboration will never catch up with NPM. If NPM already has a package I want... then what's the need for Blazor?

VS2022 and .Net 6

VS2022 Just made it to GA of which I installed last week. I spent an entire week investigating Blazor and realized my distrust of Microsoft had blinded me. Blazor is an industry disrupter.

Then I backtracked and watched the keynote VS2022 release event on YouTube. It showed what Blazor can do and was over the top good. They showed 2 Activison games written in C++ running in the browser made possible by Blazor.

Blazor also supports all .Net languages as well as Javascript and TypeScript.

The story improved, Blazor can compile to different operating systems including IOS, Linux, Android and Windows. This means a single code base for Web Apps is ready today.

The compiled WASM code also produces an .exe file. When clicked, it acts just like a desktop app. There was no explicit IIS server start required.

Rumor has it that Electron is no longer needed for desktop apps in TypeScript or Javascript, just replace it with Blazor.

Blazor also integrates seamlessly with both TypeScript and Javascript. Just create a Blazor Server Project and import all the NPM packages you want.

Blazor syntax is similar to JSX in that both code and html are in same file. The '@' sign indicates code blocks where native C# syntax is used.

Want Speed? Go view those Activision videos. Mentioned earlier.

I've now 'seen the light' regarding WASM. It's something I can't unsee. Blazor is my newfound target to pursue in 2022 as I'm pretty sure its a disrupter. My enthusiasm for Microsoft engineering has just returned to 2006 levels.

Finally: No, WASM isn't the end of Javascript. It just breaks up the once exclusive Javascript only club. It's the rebirth of how applications can be created to run within the browser.

Discussion (0)