This week's JavaScript news

Read this issue on the Web

JavaScript Weekly

Issue #138 - July 12, 2013


DevDocs: All-In-One API Documentation Reader
Provides access to the following API documentations: HTML, CSS, DOM, DOM Events, JavaScript and jQuery. The material comes from the usual places (Mozilla Developer Network et al.), but has been consistently and pleasantly styled and provides a slick search user interface. Upcoming feature: offline capability.

So You Wanna Build a Crowdfunding Site? (In Node.js)
A guide to building your own crowdfunding site in less than 300 lines of code using Node.js, MongoDB, and Express.

npmsearch: Search The npm Registry for Node.js Packages

From our Sponsor

Crank Up Your App Security with Multi-Factor Authentication
The password is dying but according to Rackspace Chief Security Architect, Major Hayden, not fast enough. The majority of us interact with web applications by logging on with a username and password. Find out why the single password is no longer an adequate form of security.


JavaScript, The Winning Style
Intriguing idea: This post looks at a series of coding style issues (how much to indent, whether to add semicolons, etc.) and finds out what the most popular style guides think about them. An included .jshintrc file allows you to enforce a style that is recommended by a majority of those guides.

The Case for setImmediate()
setImmediate(fn) performs setTimeout(fn, 0) without any delay and without unnecessarily creating a timer. Nicholas Zakas explains how it works, why it matters and that it hasn’t received much love from browser vendors, so far.

How to Unit Test Private Functions in JavaScript
How can you unit-test a function that is hidden inside a closure? This blog post describes a technique involving code snippets that expose such functions globally and are stripped out for deployment.

Getting Over jQuery
Explains how to perform common jQuery tasks with plain JavaScript. Obviously, you still need jQuery when dealing with older browsers. The article concludes with a prediction for the future of jQuery.

Developing Google Chrome Extensions
The basics to creating your own Google Chrome extension using mostly JavaScript and some JSON.

Create Keyboard Shortcuts with Mousetrap
David Walsh has evaluated several micro-libraries for handling keyboard shortcuts in a web application. Mousetrap is his favorite and described in this post.

Managing Responsive Breakpoints in JavaScript
Describes techniques for getting media-query(-like) functionality in JavaScript.

Protecting Your Mellow With JavaScript Linters
Burke Holland explains how to use the lint tool JSHint to statically check your code for problems (syntactic errors, anti-patterns, etc.).

Why Curry(ing) Helps
Explains how currying can be used to more easily combine functions.

How Does Trello Access The User’s Clipboard?
The only answer describes a clever hack that allows the web application Trello to seamlessly 'access' the clipboard (or, more accurately, manipulate what ends up there).

Thorax is Awesome
The JavaScript library Backbone.js is relatively easy to learn, but Spartan. Three popular extensions provide additional features for it: Marionette, Thorax, and Chaplain. This blog post gives a brief tour of Thorax.

Modular HTML Components with RequireJS
Explains how to use RequireJS when your HTML is modular (think widgets).

JavaScript Grid with One Million Records
w2ui is a set of jQuery-based widgets. Vitali Malinouski describes how he made the grid widget work for one million entries. The last section mentions lessons learned.

Concurrency in JavaScript with Workers
A practical look at Web Workers.

Modularizing Node Applications with Express

Extending Jasmine (the BDD Testing Framework)


Classical Inheritance is Obsolete: How to Think in Prototypal OO
There are arguments for and against constructors. In this video, Adobe’s Eric Elliott describes the latter and demonstrates his library for doing prototypal object-orientation. The contents of the video have also been transcribed to a blog post.

Transitioning to JavaScript
The JavaScript Jabber team discuss the process of making the transition from another programming language to JavaScript. (40 minute podcast.)


Node v0.10.13 (Stable)

Knockout v2.3.0 Released; v3.0.0 Beta Available

RequireJS 2.1.8

Underscore.js 1.5.0

Bower 0.10.0

Code and Libraries

Leaflet: Open-Source JavaScript Library for Mobile-Friendly Interactive Maps
Leaflet (first mentioned in JSW #27!) is basically a map widget that is highly configurable (tile layers, markers, popups, etc.) and works across a variety of browsers. It is used by many popular sites: Flickr, Foursquare, craigslist, Wikimedia, Meetup, etc.

Polymer Example At TodoMVC
The TodoMVC website now has an example for Google’s Polymer framework.

ElementTransitions.js: Simple Transitions for Web Pages
Animations that can be applied to “pages” for creating interesting navigation effects when revealing a new page (sliding in, 3D transformations, etc.).

eddy.js: Event-Driven JavaScript
Tools for event handling that work in browsers and on Node.js.

Supervizer: Node.js Fancy Process Manager
A daemon process manager to spawn/start/stop an instance of Node.js.

log-globals: Log Your Global Variables to The Console
Can be used as a bookmarklet or a DevTools snippet.

setImmediate.js: Polyfill for setImmediate()

Anima: jQuery Plugin to Animate with Transforms and Transitions
Hardware accelerated CSS3 animations with fallback on older browsers.

TreeModel: Manipulate and Traverse Tree-Like Structures in JavaScript

he: Robust HTML Entity Encoder/Decoder Written in JavaScript
Parses HTML entities like a browser would, which is more complicated than it sounds.

Haste Compiler: A Haskell to JavaScript Transpiler

typescript-pong: TypeScript Implementation of Pong


Senior Front End Developer for the National Hockey League (New York, NY)
The NHL is looking for quality front end engineers to play a key role in designing and building the next generation of NHL broadband and mobile sites. No knowledge of hockey necessary, but solid experience developing with HTML/CSS/JS/jQuery is a must.

Front End Developer for National Geographic Society
Want to help create the next engaging phase of digital storytelling? Are you JavaScript, HTML, and CSS centric? We're looking for people who are versed in our industry and are excited to keep learning. Django experience a plus!

Post a job in a future issue of JavaScript Weekly

Last but not least.. Directory of JavaScript Projects
A table of contents can be filtered by topic (UI, animation, browser, etc.) and sorted by several criteria (number of contributors, watchers, etc.). Most entries have code examples demonstrating the projects.

Editor: Dr. Axel Rauschmayer | Publisher in Chief: Peter Cooper

Want to see more? Check out the archive of all our old issues!

Reading this as a non-subscriber? Click here to subscribe.
Want to advertise? See our media kit for details.
Want to post a job? Use our self serve system or reply to this e-mail.
To otherwise contact the editor, just reply to this e-mail :-)

© 2013 Cooper Press Ltd. – Office 30, Lincoln Way, Fairfield Enterprise Centre, Louth, Lincs, UK
Unsubscribe or Update / Change Your E-mail Address