Build your own web things with the Things Framework

Last year Mozilla started Project Things to help developers connect physical “things” to the web in a safe, secure and interoperable way. Now, with the 0.4 release of the Things Gateway, you can add native web things to your gateway, to control them alongside all your other smart home devices. The advantage of native web things is that they don’t need a custom gateway adapter because they follow a common standard using existing web technologies.

Link: https://hacks.mozilla.org/2018/04/build-your-own-web-things-with-the-things-framework/

Sneak Peek at WebAssembly Studio

WebAssembly.Studio is an online IDE (integrated development environment) that helps you learn and teach others. It’s also a Swiss Army knife that comes in handy whenever working with WebAssembly (WASM). WebAssembly is a low-level assembly-like language that runs with near-native performance and provides languages such as C/C++/Rust with a compilation target so that they can run on the web. WASM is also designed to run alongside JavaScript.

Link: https://hacks.mozilla.org/2018/04/sneak-peek-at-webassembly-studio/

JavaScript to Rust and Back Again: A wasm-bindgen Tale

Recently we’ve seen how WebAssembly is incredibly fast to compile, speeding up JS libraries, and generating even smaller binaries. We’ve even got a high-level plan for better interoperability between the Rust and JavaScript communities, as well as other web programming languages. The goal of wasm-bindgen is to provide a bridge between the types of JavaScript and Rust. It allows JS to call a Rust API with a string, or a Rust function to catch a JS exception. wasm-bindgen erases the impedance mismatch between WebAssembly and JavaScript, ensuring that JavaScript can invoke WebAssembly functions efficiently and without boilerplate, and that WebAssembly can do the same with JavaScript functions.

Link: https://hacks.mozilla.org/2018/04/javascript-to-rust-and-back-again-a-wasm-bindgen-tale/

ES modules: A cartoon deep-dive

ES modules bring an official, standardized module system to JavaScript. It took a while to get here—but the wait is almost over. With the release of Firefox 60 in May, all major browsers will support ES modules, and there is current work to add ES module support to Node.js as well. Many JavaScript developers know that ES modules have been controversial. But few actually understand how ES modules work.
Lin Clark illustrates how ES modules work, what problem they solve, and how they are different from modules in other module systems.

Link: https://hacks.mozilla.org/2018/03/es-modules-a-cartoon-deep-dive/

Bringing interactive examples to MDN

Over the last year and a bit, the MDN Web Docs team has been designing, building, and implementing interactive examples for our reference pages. The motivation was to do more on MDN for people who like to learn by seeing and playing around with example code. We’ve just finished adding interactive examples for the JavaScript and CSS reference pages. This post looks back at the project to see how we got here and what we learned on the way.

Link: https://hacks.mozilla.org/2018/03/bringing-interactive-examples-to-mdn/