December 2015
Intermediate to advanced
240 pages
4h 57m
English
The following implementations are available for the observer pattern:
Let's understand both the implementations in detail.
The event dispatcher/listener (event emitter) implementation allows broadcasting data to more than one consumer. EventEmitter can be inherited in the case of more than one event represented by one object. We can use the on function for the EventEmitter implementation in the observer pattern to define objects for listening to an event. Objects in the event dispatcher implementation uses custom events that can be inherited from an event dispatcher object. It uses different kind of strings to identify the type of the event. ...
Read now
Unlock full access