The If Works This dirt was a building before

ChainCollector

JS.Class 2.1.5 supports Node, Narwhal and more

While there’s much work going on towards what will probably be JS.Class 3.0, the 2.1.x series is benefiting from some of the goodness being added upstream. I’ve just pushed out a new release that gets the package manager and all the libraries to work under CommonJS, specifically targeting Node.js and Narwhal for now. I’ve had [...]

JS.Class 2.1: an improved package manager, proper hashes, and lots of Ruby 1.9 goodness

Having managed to go the weekend without making any more fiddly changes to it, I’m finally pushing JS.Class 2.1 out of its Git repo and into the real world. The major updates in this release are a Hash implementation, a much-improved package manager that runs on server-side platforms, and lots of updates taken from Ruby [...]

Urgent bug fix release for JS.Class 1.6

Quick announcement: if you’re still running JS.Class 1.6, you’ll want to upgrade to the just-released 1.6.3 release which fixes a major bug introduced by Safari 4. This browser makes Function#prototype non-enumerable until it is overwritten by the user. This caused a check in JS.Class to fail, causing classes to become their own parents and cause [...]

Where did all my code go? Using Ojay chains to express yourself clearly

I’ve been putting together a presentation to be given internally at work on what Ojay is and why we’re doing it. It occurred to me that I’ve not spoken very much about it here, hoping the documentation and examples would speak for themselves. So, today I’m going to go through how to take an animation [...]

JS.Class 1.5 is now out

Hot on the heels of Ojay comes a new release of JS.Class, my Ruby-inspired JavaScript library for class-based OOP. Ojay is itself based on JS.Class, and has influenced the design of some of its new features. There has been one small change to the 1.0 API, and a stack of additional modules added in; it’s [...]

Announcing Ojay, the nice way to use YUI

I’ve been wanting to talk about this project for weeks if not months, and now I finally can. the OTHER media (the web shop I work for) is open-sourcing Ojay, a project I’ve been developing on-and-off since I started at the company back in October. It’s a wrapper for the core DOM, event, animation and [...]

Using ChainCollector to respond to Ajax calls

Saq made a couple of comments on my ChainCollector article about how to queue up functions to respond to Ajax calls, and whether I could write something up to shed a bit of light on how this might be done. Today, I’m going to implement some methods that allow to GET from/POST to a URL, [...]

Asynchronous function chaining in JavaScript

Update, 25 February 2008: This class is now available as part of JS.Class (it’s called MethodChain now). It also forms a key part of Ojay, an expressive wrapper for YUI. Update, 12 Dec 2007: Another implementation change. A blank ChainCollector instance now has the following properties: then, and, ____ (formerly __enqueue) and fire. The method [...]