The Observer Pattern

Abstract

In an event-driven environment, such as the browser where it is constantly seeking attention from a user, the observer pattern, also known as the publisher-subscriber pattern, is an excellent tool to manage the relationship between people and their jobs, or rather, objects, their actions, and their state. In JavaScript terms, this pattern essentially allows you to observe the state of an object in a program and be notified when it changes.

Keywords

Dispatch 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Ross Harmes and Dustin Diaz 2008

Personalised recommendations