a new era in web development
Running .net code in the browser (client-side)! and no I am not talking about a return of Silverlight. Web development is heading in to a new era with Web Assembly (Wasm), which enables us to run several languages as client side script in the browser.
Whaaaaaat! you say.Watch this and be amazed
Web Apps can’t really do *that*, can they?
Steve Sanderson NDC 2017
Steve Sanderson
Well it is true. Web assembly (Wasm) allows your (.net )code to run in the browser as it compiles it to it’s own binary format. How can Web assembly compile .net code? Well the mono team (now part of Microsoft) has added support of the mono runtime to web assembly where your code can run as both interpreted (mono run times loads your dlls) or Ahead of Time compilation (AOT) where your .net code is compiled to WebAssembly binaries.
So why use it…? One reason is to be able to run your favourite language in the browser where before only JavaScript has been allowed. But that is not the only benefits!
WebAssembly has huge implications for the web platform — it provides a way to run code written in multiple languages on the web at near native speed, with client apps running on the web that previously couldn’t have done so.https://developer.mozilla.org/en-US/docs/WebAssembly
Other benefits
- Fast
- No plugins
- Runs side by side of your JavaScripts
- Open standard developed in a W3C Working Group
- Already implemented in all major browsers
So how is this achieved
WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine.
Wasm is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.https://webassembly.org/
meaning that wasm is a small virtual machine running inside the browser and can interact with the browsers rendering process.
Further reading
Summary
Is this the end of JavaScript? off course not! however it offers some interesting alternatives which I for one want to explore as they become more mature.
Recent Comments