December 2015
Intermediate to advanced
240 pages
4h 57m
English
In this chapter, you will learn about the observer pattern in JavaScript. We will see its advantages, disadvantages, usage, and so on. We will see different faces of observer pattern and its use with the help of observer and subject class. We will also see how we can optimize code using the observer pattern.
The observer pattern defines a relationship between more than one object where one object is observed by many others. The system is designed in such a way that when a state of the observed object is changed, all observing objects get notified automatically. This pattern is also known as dependents and pub/sub (publication/subscription).
Mainly people like to use the observer pattern in JavaScript, and ...
Read now
Unlock full access