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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2008 Ross Harmes and Dustin Diaz
About this chapter
Cite this chapter
(2008). The Observer Pattern. In: Pro JavaScript Design Patterns. Apress. https://doi.org/10.1007/978-1-4302-0496-1_15
Download citation
DOI: https://doi.org/10.1007/978-1-4302-0496-1_15
Publisher Name: Apress
Print ISBN: 978-1-59059-908-2
Online ISBN: 978-1-4302-0496-1
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books