Want more? Subscribe to my free newsletter:
Understanding the Publish/Subscribe Pattern for Greater JavaScript Scalability
June 25, 2011
Design patterns are an invaluable tool for modern JavaScript developers, providing us with generalized reusable solutions to commonly occurring problems in application design that we can apply to our own problems. In addition, they provide the community with a common vocabulary we can use to discuss our designs, which can often be a non-trivial process.
Today, we'll be exploring a design pattern so common to JavaScript development, you've probably used it before, whether you were aware of it or not. It's called the Observer pattern and is often referred to and implemented nowadays as the publisher/subscriber (pub/sub) pattern.
Click here to read the rest of this post on Script-Junkie.