Writing Modular JavaScript, Fake Private, Boulderdash, Shopify Fund

2011-11-04 00:00:00 +0000 by Alex R. Young

Writing Modular JavaScript

I've mentioned the Asynchronous Module Definition spec on DailyJS
before, but for a thorough writeup of this specification take a look at
Writing Modular JavaScript With AMD, CommonJS and ES Harmony by Addy Osmani. It
includes comparisons with script loaders, how to write modules (with
code examples), and related topics like creating classes with getters
and setters.

There are risks here such as specifications changing and a potential failure at the cross-browser level (IE9 for example will take a while to die) so your best bets until we have both spec finalization and coverage are AMD (for in-browser modules) and CJS (for those on the server).

The document has been technically reviewed by Andrée Hansson, and
includes links to other reference material on ES Harmony and ES.Next.

"No Fake Private"

There's a huge discussion going on at this gist:
minimalist-classes.js, and I was particularly intrigued by some of Brendan Eich's

If we are doing private, it'll use private name objects. No fake private. Enumerability has nothing to do with it.

It's certainly a heated debate, but it's interesting nonetheless.

JavaScript Boulderdash

Back in the 8-bit era I had a ZX Spectrum, and I seem to remember
enjoying Boulder Dash. Jake
Gordon is a Commodore 64 fan, and he's created a simple version of this
game that can actually play all of the original levels. In JavaScript
he explains how this Canvas-powered game works, with detailed coverage
on the game loop and asset loading.

This is the first of a series of posts which can be followed on Jake's
amazingly cool blog, Code inComplete (about 80%

Shopify Fund

The Shopify Fund is a one million dollar fund for building apps on Shopify's platform:

If you have an idea for an app or utility, tell us about it. We'll evaluate it, and if we decide to support your project, we'll provide an advance in the neighborhood of \$5,000 - \$10,000 on future sales in the App Store.

If you're itching to go independent with server-side JavaScript apps and
are looking for opportunities, it's worth checking this out.