This Week in JavaScript - 17 March 2014

Welcome to your weekly update of JavaScript news and goodies.

Learning more

A criticism of the Single Var Pattern in JavaScript, and a simple alternative (rant)
JavaScript: bind function
Naming JavaScript Functions
Promises and Error Handling
Online JSON parser with nice formatting options

Graphics

Building a WebGL logo
WebGL Filter - An image editor in WebGL
HTML5 Canvas Tutorial: An Introduction
CamanJS - Advanced and efficient image/canvas editing techniques
Rendering large terrains
PSDiff - Simple PSD previews for Git

Libraries

z.js - Turns content [in]visible
JSONSelect - CSS-like selectors for JSON
Webshims Lib - A capability-based polyfill-loading library
WolverineJS - Library for server-side logging with levels and special Error object logging
Quink - A rich, web- and mobile-friendly editor
Froala - A beautiful jQuery WYSIWYG text editor

jQuery

Is jQuery Too Big For Mobile?
jQuery Coding Standards & Best Practices
jQuery Cheatsheet

Testing

Testing event binding and unbinding with Jasmine
My RequireJS Itches and How I Scratched them using Browserify
Shmock: An Express-Based HTTP Mocking Library for Node.js

AngularJS

Using AngularJS to create iPhone & Android applications
Mocking $resource and promises in AngularJS unit tests

Taking things further

Custom Error Objects in JavaScript
Redefining a function as you debug it in Chrome DevTools

Future changes

Next Generation JavaScript
ECMAScript 6 - let vs var
Tree Traversal With ES6 Generator
An empty repo to make it easy to experiment with ES6
Functional programming with JavaScript is beautiful

Fancy stuff

Butterfly - Your Terminal in your Web Browser

So what are your thoughts on the latest going-ons in the world of JavaScript? Have you started doing much exploration of the ES6 features, and do you feel that you are drowning in too many tools?

Please PM us if you have anything of interest for the next issue, and happy reading! - Paul & [URL=“http://www.sitepoint.com/forums/private.php?do=newpm&u=184222”]Pullo

The “single var pattern” article is ignoring an alternative way to define variables using a single var that is closer to how JavaScript actually works than either of the variants the article discusses:

function() {
    // declarations
    var declare, your, using, single, statement, semicolon;

    // assignments separate from declarations
    declare = 'all';
    your = 'variables';
    using = 'a';
    single = 'var';
    statement = 'then';
    // Everything else.
}

Another reason for giving your functions names when you use them in event listeners is that it makes it easier to remove the event listener again.