Hello and welcome to This Week in JavaScript, our lovingly curated collection of links relating to what’s new and exciting in the world of JS. The complete list is tagged jsweekly. (Don’t forget to check out our weekly .NET and front end roundups too!)
And now for this week’s JavaScript finds …
Getting Started
- JavaScript for web designers: DOM scripting - There are two purposes to the DOM: providing JavaScript with a map of all the elements on our page, and providing us with a set of methods for accessing those elements, their attributes, and their contents.
- 10 jQuery performance tips and tricks - Although the jQuery library is lightweight, improper usage of it might cause poor performance.
Learning More
- Using HTML form validation in pure JavaScript - Can we use HTML-based form validation in a purely JavaScript form?
- Building a JavaScript 3D Minecraft editor - I wanted to simulate a Minecraft world (or a tiny part of it at least). I wanted the same kind of functionality, but with HTML, JavaScript, and CSS.
- A JavaScript watcher that works just right - It uses Object.defineProperty and requestAnimationFrame. It finds the right timing to trigger object changes. It’s clean, efficient and extremely performant.
- An interview With Giovanny Beltran, js13kgames winner - Winner of many categories at js13kgames, and one of the best entries in this year’s contest.
Libraries
- Scribbly - Scribbly is a simple isomorphic logging tool which is based on middleware system.
- Sequence-as-promise execute array of functions and promises in sequence - a zero dependency, lightweight function that allows execute array of functions and promises in sequence and returns a promise.
ES6 and beyond
- The ECMAScript 2016 change you probably don’t know - The “use strict” directive cannot be used in the body of a function whose parameters either have default values, use destructuring, or a rest parameter.
Yarn
- So I tried Yarn, yet another new JavaScript tool - Repetitive tasks like downloading dependencies, building, linting, runing tests, … need to be the fastest possible, and trying Yarn follows that logic.
- Why I’m excited about Yarn and you should be too - take a closer look at a new package manager called Yarn (collaboratively launched by Google, Tilde, Facebook, and Exponent), and discuss the most important improvements that it’s claiming to make.
- NPM vs Yarn benchmark - So I benchmarked Yarn against the 4 most popular CI tools.
Frameworks
- A visual guide to state in React - React’s “state” is one of the more difficult concepts to learn. Not just what to put in state, but what it actually is and what it’s for. And also how Redux is related to React state.
- Form validation as a higher order component: Building the Actual HOC Validator - Use React and Recompose to build a higher order component that accepts a function or a class containing form elements and take care of validating the inputs and returning and rendering the errors when needed.
- Migrating Angular 1 applications to Angular 2 in 5 simple steps - Learn how to migrate gradually, component by component, module by module using NgUpgrade and the Angular Router.
- Getting to know Angular 2’s module - Angular 2 has re-introduced the module concept since RC 5 onwards (and now Final Release!). Why do we say reintroduced instead of just introduced?
- Simple build tools: npm scripts vs makefile vs runjs - Which command line based build tool to choose ? What’s the differences between them ?
Testing
- Acceptance testing in JavaScript with Cucumber.js & WebdriverIO - WebdriverIO lets you write tests, with actions through which you can control the browser and assert the results. You can use services such as Mocha, Cucumber, or Jasmine.
For more links like this and to keep up-to-date with the latest goings on in JS land, you can follow SitePoint’s JavaScript channel on Twitter.
Please PM us if you have anything of interest for the next issue or if there is anything you would like to see featured. Paul and chrisofarabia.