Microsoft, Google, Apple, and Mozilla Collaborate On Game-Changing Web App Tech

Developers at Mozilla, Google, Microsoft and Apple are working together on a new binary format that can be used to compile applications for the Web.

Long term, if it becomes a Web standard implemented in all major browsers, the new format, dubbed WebAssembly, would give developers the ability to build applications in their favorite languages, and then compile the code for execution in browsers. The significance of that flexibility is not to be underestimated as it could potentially help browser-based Web apps compete against native, downloadable applications like those for iOS and Android, which continue to remain popular in large part because of the performance they offer users.

To start, the WebAssembly team seeks to support C/C++, but support for other languages is slated for the future and a big part of the WebAssembly vision. If WebAssembly lives up to that vision, developers who are used to working with non-JavaScript languages will not have to learn a new language to ply their trade with users of the Web. Conceptually, the idea is similar to the way the Java and .NET machines can be targeted with multiple languages (eg. Ruby For Java and Python for .NET). 

WebAssembly potentially offers a number of advantages. The biggest: The binary format can be natively decoded more than 20 times faster than JavaScript. And it offers improvements over what can be accomplished with asm.js, a Mozilla-designed JavaScript subset that also aims to deliver better performance. While Brendan Eich, a WebAssembly contributor, calls asm.js "great" and notes that out of necessity "wasm and asm [will] stay equivalent for a decent interval," WebAssembly can avoid some of asm.js's constraints and offer "significant size savings before and after gzip compression."

Applications compiled by WebAssembly will use the file extension .wasm. Because no major browsers currently support WebAssembly, which is still in the earliest stages, the format's creators plan to offer a JavaScript polyfill.

Ultimately, Eich says the WebAssembly team is "aiming to develop the Web’s polyglot-programming-language object-file format," a significant undertaking that, if successful, could one day change the face of how applications are developed and delivered on the Web.

Not a Replacement for JavaScript

While on the surface WebAssembly appears to address many of the limitations of JavaScript and promise a better solution for developing browser-based apps that perform more like native apps, WebAssembly's creators are adamant that they're not trying to replace JavaScript.

"WebAssembly is designed to be a complement to, not replacement of, JavaScript (JS)," they explained. "While WebAssembly will, over time, allow many languages to be compiled to the Web, JS has an incredible amount of momentum and will remain the single, privileged ... dynamic language of the Web." 

In fact, WebAssembly's creators cite a number of use cases in which WebAssembly will likely be used alongside JavaScript to create better applications and experiences. For example, WebAssembly applications may use JavaScript "to glue things together," while JavaScript apps may use WebAssembly components where greater performance is required.

It's also important to note that while some of WebAssembly's most exciting use cases are in the browser and the project is billed as "portable, size- and load-time-efficient format suitable for compilation to the Web," WebAssembly's promise of a standard, performant file format that lots of languages can compile to will likely have appeal beyond the browser. As such, WebAssembly could one day also change the game for the development of server-side applications and hybrid native apps that run on devices.

Patricio Robles Follow me on Google+

Comments

Comments(1)

mobilecode_fan

That sounds very paradigm-changing, especially given these large companies involved.

 

By the way, your twitter widget isn't quite working. It doesn't prefill the twitter body automaatically, just letting you know.