Web Assembly

By James Harrison on Monday, February 18th, 2019 The future of the web is here. No really. Backed by the W3C, Web Assembly is a high performance platform for C#, C++, and Java developers to build applications that run directly in the browser.

What is Web assembly?

Web assembly is byte code that runs natively in a browser, without plugins. It enables complex applications to run in the browser. Web Assembly overcomes the performance limitations of Angular and React applications, which have to interpret javascript. In addition, it allows Java, C# and C++ developers to develop for the web, and legacy applications to more easily be ported to the web and run at the same speed as a native application. Web Assembly is also fully backed and supported by W3C consortium. This is a very important factor. Unlike Flash, Flex and Silverlight, which were proprietary products, Web Assembly is fully open source and not owned by any one company . It is a W3c initiative fully supported by all of the major browsers.

Benefits of Web Assembly

There are three main benefits to Web Assembly. First it runs fast, almost as fast as a native application running on the systems OS. Because it is assembled byte code, web assembly applications do not need to be interpreted The second is that multiple languages compile to it, including legacy languages. This opens up the ability to port older applications to the web, instead of completely rebuilding them in JS applications. The third main benefit is that is runs natively in the web. It does not require a plugin or an upgrade to the users browser in able to run.

How Web Assembly Works

Web Assembly uses the JavaScript runtime to execute. The format of Web Assembly is a .wasm file. This file resides on the server, is lined to the page through an HTML element and is run by a javascript command. Web assembly works with JavaScript and not in place of it. To create a Web Assembly application a developer has two main approaches available, they can develop in Web Assembly using Web assembly studio, or they can compile an existing project written in C#, C++, Java or Rust, and compile this code into Web Assembly byte code. What is the use case? The main use case for Web Assembly is the ability to build higher performance applications running in the browser. These applications will run 6 to 20 times faster than applications built in Javascrtipt libraries or frameworks. Here are some examples:
  • Virtual reality
  • Complex applications
  • Video games
  • 3D applications
  • Here at Visual Antidote, we are looking forward to working with Web Assembly in the near future.

Resources

See links below for more information and resources https://blazor.net/   https://webassembly.org