Introduction to WebAssembly for .NET Developers
Tags: underthehood, net, angular, blazor
Published: 2019-10-11 15:20:23

---
title: Introduction to WebAssembly for .NET Developers
published: true
date: 2019-10-01 17:42:13 UTC
tags: Under The Hood,.net,angular,blazor
canonical_url: https://platform.uno/webassembly-for-dot-net-developers/
---

_Guest Blog Post by Antonii Georgiev_

I really feel that we are on the brink of a revolution. It’s still very early in the revolution, but I feel like WebAssembly is going to completely change the way we think of web applications.

WebAssembly has slowly been stirring up fire since its creation, but why exactly should you be interested in it?

## Firstly, what is WebAssembly?

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2019/10/01090519/wasm-pic.png)<figcaption id="caption-attachment-1233"><em>Image from: https://blog.logrocket.com/webassembly-how-and-why-559b7f96cd71/</em></figcaption>

 

WebAssembly operates on a stack-based machine that allows web applications to run near-native speed by using a binary format. It can be generated by higher level programming languages like C++ or C#. The idea is that it runs a lot faster than JavaScript.

It’s quite efficient, meaning it’s fast to load and execute. It’s safe and portable just the way JavaScript is. You don’t have to deal with memory overflow exploits and things of that nature. Lastly, it’s portable so it will run in almost any modern browser nowadays.

WebAssembly is not intended to kill JavaScript, and it probably won’t. Maybe someday it might replace JavaScript in certain scenarios, altering the way we write our web apps just enough that we may end up writing the majority of our applications in an entirely different language.

## Secondly, when should I target WebAssembly?

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2019/10/01133548/image001.jpg)<figcaption id="caption-attachment-1238"><em>Image from: https://www.youtube.com/watch?v=ysFJHpS-O08</em></figcaption>

Heavily CPU-bound number computations are your best bet – things that deal with math – WebAssembly really shines with these. The most common things that come to mind for engineers when they think of numbers are games or 3D visualizations. But you can write mostly any web app using WebAssembly if you please.

For the most part WebAssembly is a fairly new technology, and not all of its application factors have been figured out yet.

## What does this mean for .NET Developers?

Browser system applications have been engineered in JavaScript since the early days of the Web, meaning C# developers would need to either work with more than one language or avoid browser system development altogether. WebAssembly may change all of this by providing the bridge for .NET developers to enter the browser.

Right now, if you want to write an application that is running in the browser you have to leverage JavaScript, but there are some new things that have come around with WebAssembly. We are beginning to step away from the days where JavaScript rules the browser only and new tech is being introduced to the ecosystem. This is where new WebAssembly-inspired tech enters the picture.

### _Blazor_

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2019/10/01133700/image002-e1569951493810.jpg)<figcaption id="caption-attachment-1239"><em>Image from: https://www.youtube.com/watch?v=qDoSAnwNgQI</em></figcaption>

Blazor is an experiment backed by Microsoft and made by the ASP.NET team that allows you to create your own web app using C# and Razor-like syntax. It gives us the ability to write C# code on the client-side of a web application. In a way it’s almost like a replacement for powerful JavaScript frameworks such as Angular or React. Unlike the mentioned frameworks though, Blazor has an easier and quite smooth learning curve.

### _Uno Platform_

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2019/10/01090903/UnoLogoLargeCut-1.png)

Uno Platform is a project that aims to provide users with the opportunity to build mobile, desktop and WebAssembly apps with C# and XAML, all from a single codebase. Developers define their UI in platform agnostic markup language XAML, which in turn renders the application’s native UI elements. Developers new to XAML don’t need to do a lot of homework to get used to it, because it allows devs to reuse many of their skills such as MVVM, databinding, controls, etc.

## WebAssembly wrap-up

![](https://s3.amazonaws.com/uno-website-assets/wp-content/uploads/2019/10/01091008/webassembly-pic.png)<figcaption id="caption-attachment-1235"><em>Image from: https://www.inovex.de/blog/webassembly-production/</em></figcaption>

Even though the technology is a couple of years old by now, we’re still in the early stages of its existence, while not clear in what direction it might turn in future releases, it looks quite promising and it’s likely to be very popular (it’s already a big conversion topic 😉 ).

The post [Introduction to WebAssembly for .NET Developers](https://platform.uno/webassembly-for-dot-net-developers/) appeared first on [Uno Platform](https://platform.uno).