Tag Archives: observer

(JavaScript) JavaScript Observer Pattern

The Observer pattern is more popularly known these days as the Publish/Subscribe pattern. It is a design pattern which allows an object (known as a subscriber) to watch another object (the publisher), where we provide a means for the subscriber and pub-lisher form a listen and broadcast relationship. Popular JavaScript libraries such as dojo, jQuery [...]

Posted in JavaScript | Also tagged , , , , | Leave a comment

(JavaScript) Observer-Pattern in JavaScript

Could be improved by passing an event instead of a simple payload.

Posted in JavaScript | Also tagged , , , | Leave a comment