Let’s Make a an Observer Library Most books and articles on javascript trends towards two extremes: basic instruction in the execution and idiomatic patterns of javascript as a language and basic usage of popular browser-focused utility libraries written in the language. In the first category I group The Definitive Guide, Crockford's The Good Parts, Resig's Pro JavaScript Techniques and Harnes & Diaz's Pro JavaScript Design Patterns; in the second, jQuery, Novice to Ninja, Mastering Dojo, and Practical Prototype and Scrtip.aculo.us.

In the wide gulf between these two sets there is almost nothing written. This leaves an intermediate javascript developer adrift. You understand basic language constructs, prototypal inheritance, and functional programming patterns. You've built a few browsed-based applications so you're accustomed to the DOM and user-generated event-based programming.

But, like me, you're probably stumped when it comes to writing your own reusable libraries or organizing a large application. The flexibility everyone lauds in language can be an idiomatic quagmire when you're between the basics and off-the-shelf utility libraries.

Given all this, I was super geeked when Alex Young started a new series of articles entitled Let's Make a Framework. This is some of the best middle ground writing about JavaScript I've read.

I'd like to add to the body of work in this area, so over the next few weeks I'll be series of posts that explore writing a javascript implementation of the observer pattern. Like Alex's series, this goal is creating an educational exercise for the reader, not to craft a ground-breaking library.

I'm going to cover

Doing this, I'll focus on some modern development techniques:

Let’s Make a an Observer Library. Part I: Library Architecture

Welcome to part 1 of Writing an Observer Library, a series of posts about building a JavaScript library to implement the various flavors of the observer pattern. In this part I’m going to discuss library architectures, and lay down the design for our framework.

This series is inspired by Alex Young's series of articles entitled Let's Make a Framework. Like Alex's, this series is designed to be educational. Also like Alex, we're going to define a set of practices to govern the library's crafting: