If you write a lot of asynchronous or event-driven code, you’re probably going to end up needing an asynchronous for loop. That is, a loop that runs each iteration sequentially but those iterations may contain non-blocking logic that must halt the loop until the async action resumes. In my case, I need the main loop [...]
The MIT license, in case you’re not familiar with it, is one of a family of software licenses recognised by the Open Source Initiative. It’s one of the shortest and most liberal, and reads as follows: The MIT License Copyright (c) 2010 James T. Suckerpunch Permission is hereby granted, free of charge, to any person [...]
This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Earlier in this series I covered a very common pattern in event-driven programming: the [...]
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 [...]
Just a quickie to let you know I’ve pushed out new minor releases of JS.Class and Helium tonight. The updates in JS.Class 2.1.4 center around a totally rewritten package manager that uses an event cycle to trigger dependency downloads instead of polling packages to find out when they’re ready to load; this should make a [...]
This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Building on the pattern for deferred processing that we just saw, asynchronous methods are [...]
This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps The Deferrable pattern is a specialisation of observable objects that mixes state into the [...]
This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps As I mentioned in the previous article, events are not things that only live [...]
This post is part of a series on event-driven programming. The complete series is: Events: they’re not just for the DOM, you know Observable objects Deferrable values Asynchronous methods First-leg round-up and final remarks Object lifecycle Asynchronous pipelines Testing event-driven apps Over recent months we’ve seen the major JavaScript libraries talking up their event support. [...]
A couple weeks ago there was rather a lot of excitement over the fact that Google released a new Analytics snippet that loads the tracking library asynchronously. This is indeed great news, for reasons pored over in the aforelinked articles. But let’s take a closer look at Google’s implementation: var _gaq = _gaq || []; [...]
© The If Works. Powered by WordPress using the DePo Skinny Theme.