JavaScript Design Patterns: Factory

Table of Contents Factories encapsulate and separate object creation from the rest of your code. In situations where the creation of an object can be complex »

JavaScript Design Patterns: Decorator Update

Yesterday's post drew a lot of traffic from Reddit and with it came some really good feedback. If you haven't read the previous post please do »

JavaScript Design Patterns: Decorator

Table of Contents Update: Part 2 has been posted! A Decorator is an object which adds functionality to another object dynamically. It can be used to »

JavaScript Design Patterns: Observer

Table of Contents Observer is one of the most popular design patterns and chances are you're probably already using it. If you've ever written an event »

JavaScript Design Patterns: Iterator

Table of Contents If you're coming from Ruby or Java you probably think of an Iterator as an object which gives you a consistent interface for »