The JavaScript blog.


libraries events conferences types

Flow, Frontend Conference, jQuery Conference

Posted on .


If you like strongly typed languages, then there are more options than ever for JavaScript. Other than TypeScript, a major new tool is Flow (GitHub: facebook/flow, License: BSD) from Facebook. Flow allows you to annotate code with comments to get type checking -- this is known as weak mode. You can also use real type annotations, which means you'll have to use the Flow transpiler to deploy code.

Flow is written with OCaml, and it's available through the OPAM package manager (opam install flowtype).

If you want type checking without completely changing JavaScript, then you may like TypeScript. There's even a Flux and React demo:

In this case study, we take an existing React project and attempt to have Flow be able to successfully type check its code. While it will not be an automatic, run the Flow type-checker only one time win, we will show that it does not need to be painful to use Flow on your existing projects.

You Gotta Love Frontend Conference

The You Gotta Love Frontend Conference is being held in Tel Aviv from June 8th through to June 9th, 2015. Tickets are available from 750 NIS, which is about $190. The speakers include Douglas Crockford, Lea Verou, and Martin Kleppe, so it sounds like it'll be worth attending!

jQuery Conference: San Francisco

Famo.us is hosting a jQuery Conference in San Francisco on June 22nd and 23rd:

Famo.us, the JavaScript framework for building beautiful, high-performance web and mobile UIs, is hosting a jQuery conference on June 22nd - 23rd, 2015 at the Regency Ballroom in San Francisco, CA. Tickets go on sale April 1st at 10am PST. We are releasing a limited number of Super Early Bird tickets for $150. After they sell out, we will offer attendees an Early Bird ticket for a week at $225, before the General Admission tickets go on sale for $350.

This is the official jQuery San Francisco conference, which has its own site here: jquerysf.com.


testing node modules types

Lukis, Backbone.Controller, lrDragNDrop

Posted on .


Lukis (GitHub: keripix / lukis, License: MIT) by Keripix is an experimental image editor, built with Twitter's Flight and Fabric.js.

It's event driven, so each main drawing component is nicely decoupled. This is based on Flight's API, where behavior is mapped to DOM nodes.


Backbone.Controller (GitHub: artyomtrityak / backbone.controller, License: MIT) by Artyom Trityak is a Backbone controller that supports declarative routes. It makes Backbone feel more like traditional MVC, which may appeal to you if you're brainwashed by other MVC frameworks.

Artyom has included some documentation showing how to bind routes using Backbone.Controller.extend, and there's also a RequireJS AMD snippet so you can get started quickly.


lrDragNDrop (GitHub: lorenzofox3 / lrDragNDrop, License: MIT) by Laurent Renard is an AngularJS module for managing collections of items using drag and drop.

You can use it as a directive, and load it with angular.module('myApp',['lrDragNdrop']). Items can be dragged from one collection to another, copied, and sorted.


testing node modules types

Node Roundup: 0.11.10, Ducky, Test-driving a Node.JS API

Posted on .

Node 0.11.10

Node 0.11 is now pushing double figures. The three main dependencies have been updated (http_parser, uv, v8), and the core modules have a lot of fixes.


Ducky (GitHub: rse / ducky, License: MIT, npm: ducky) by Ralf S. Engelschall is a library for querying and validating objects.

The ducky.select method accepts an object and a "path" -- this path is based on dot notation. The ducky.validate method accepts an object and a string representation of its types. The validation syntax is based on JSON with some regular expression hints.

Ralf has included tests based on Chai, and you can also use this module in client-side projects.

Test-driving a Node.JS API

Test-driving a Node.JS API by Joris Ooms is a blog post about setting up a test-driven project based on Express, SuperTest, and Mocha.

At the end he says:

Often, routes are locked behind authentication (with, for example, PassportJS). We can test these just as easily with supertest, through its lower-level module superagent. I will cover this in a future blog post.

I think he's going to talk about the technique I use for testing my web applications, where authentication is handled with SuperAgent and cookies. It's a bit awkward to set up, so it'll be interesting to see what he says.