JavaScript articles

obey_report_header

Obey and Report - A JavaScript Event Emitter Pattern

Obey and Report - A JavaScript Event Emitter Pattern

By Nicolas Bevacqua The event emitter pattern was popularized by Node and is made available in the browser by libraries such as EventEmitter2. In practice, I haven’t seen a lot of use of event emitters in client-side applications, but lately I’ve been applying it more and more in my code. Here, I’ll introduce a modular approach to […]

animated-canvas-header

Creating an Animated Hero Image with Canvas

By Dave DeHaan When we were looking at laying out spark.lamplighter.io, we decided we wanted to add the feel of our graphs to the top of the page. The suggestion came up that it would be cool if our graph actually “cut off” our hero image, so that any part of our hero image under the […]

audio_synthesis_header

Audio Synthesis in JavaScript

By Keith Peters Yes, you can create sound in JavaScript - at least, in some browsers. Supposedly, it works in Chrome 14, Firefox 23, Opera 15 and Safari 6 but not IE (Note: for this post, I’ve only tested in Chrome). So for now, playing with creating sound in JavaScript should be considered something experimental […]

monads_header

A Gentle Introduction to Monads in JavaScript

By Sean Voisen Monads: they’re incredibly useful, and also a little intimidating. Beginner functional programmers often cringe when they hear the term. JavaScript legend Douglas Crockford once said that monads are cursed – that once you understand monads for yourself, you lose the ability to explain them to others. In the programming language F#, monads are called […]

typescript09_header

TypeScript 0.9 - What’s Improved

By Nicholas Wolverson I’ve been noodling around with Typescript for a while and enjoying the various improvements over standard Javascript. Quite a bit of this comes from ES6 improvements which Typescript incorporates (and transforms to a sensible ES3 output) - for example real classes, and this-capturing lambda expressions that help avoid the number one kick-yourself […]

json_config_header

JavaScript Configuration Object Pattern

By Cory House So you’re building a modern web app? That means you’re likely running a variety of client-side libraries and custom business logic in JavaScript. One of the first hurdles you run into is, “Hey, I need some data from the server injected in my JavaScript.” Some developers, when posed this problem, have an […]

promises_header

A Simple Visual Model for Promises

By Vittorio Zaccaria Promises are gaining ground as a programming construct for asynchronous systems such as web applications. In its simplest form, a promise represents the state of the result of some future computation. I was introduced recently to this construct when studying jQuery and AngularJS. In the beginning, I wasn’t able to wrap my head around it. While I understood […]

brackets_extensions_header

Extending the Brackets Code Editor with JavaScript

By Alessandro Artoni As web developers, we have all tried many different tools, IDE’s and text editors to improve our daily workflow. Apart from the old-fashioned vim/emacs lover, many of us currently use either Sublime Text (with its great collection of plugins) or WebStorm. Both have great features, plugins and support but there’s a new player that I […]

Top