Thursday, June 25, 2015

WebAssembly, an end of Javascript?

Apple, Google, Microsoft and Mozilla have joined together for a common cause!

Are you kidding me?

All these companies are rivals, then how come is this possible?

Yeah it is true. They all joined together and developing a new web programming standard called "WebAssembly".

What is WebAssembly?

WebAssembly is a universal binary and text format for the web. In short form this is being called as 'wasm' WebAssembly in a binary format which is a low-level binary format than Javascript.

Why does it matter?

WebAssembly's binary data is smaller in size. Which means the binary data will be downloaded quickly. Since it is in a binary format, the decoding and execution is also much faster than Javascript.

This is already proved by Mozilla engineers. They recently released some preliminary performance numbers for WebAssembly. Based on their data, wasm is 20-30% smaller in size and 23x times faster than parsing. Which is pretty good performance numbers even at the earliest stage of the wasm development.

The name "WebAssembly" got traction recently because all the 4 big companies in the browser market have one voice. So there is no doubt on the adoption of the technology. 

WebAssembly is a binary format which will be standardized soon. Once it is standardized we can write code in any programming language and the compilation will generate the binary format which is understandable by the wasm standards. They are targeting C/C++ languages for their initial version. All the other programming languages will be supported going forward.

They have already hosted a project in GitHub and working on the design for wasm. You can also join the w3 community and participate in the discussion.

Other initiatives:

Over the last few years Google, Apple and Mozilla are working on the same domain with different goals. Google is already working on PNaCl (portable Native Client). Apple is working on FLT LLV and Mozilla is working on asm.js. Unfortunately Microsoft has any no counter part so far.

All these companies have different learning from the above initiatives. Since they all joined together, all their learning will be applied into WebAssembly programming. So we can be believe that, WebAssembly will make a great impact with the current web programming domain.

Is that an end of Javascript?

As you all know Javascript is the dominant programming language for the web. Javascript eco system is so big and lot of enhancements are also planned for the next ES6 upgrades. Since wasm is being under the development now, it will take some time to find the user base.

But definitely wasm will take a big share from Javascript. Some of the use-cases are image processing and memory consuming operation in browser. wasm team announced that, we can even develop a full fledged web application with wasm. Since this can be possible using our known programming languages, there will be no need to learn Javascript anymore :(

But wasm community is claiming that, instead of a threat, wasm will enhance Javascript. What ever it may be, this would be a great time for all of us as a web programmer and an user. We are going to get lot of fun stuff on the web very soon...

Please share it with your friends and subscribe the newsletter if you like the article. Keep watching this space for more updates...

No comments:

Post a Comment