permalink

2

Understanding the Publish/Subscribe Pattern for Greater JavaScript Scalability

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.

2 Comments

  1. I'm still trying to figure out why it's being called "pub/sub"…..is there *any* difference between "pub/sub" and the traditional Observer pattern? If so, that is the only info that I would like to have presented. If not, then I vehemently oppose the term "pub/sub" on account of duplicity and an additional layer of confusion upon an already simply pattern.

Leave a Reply

Required fields are marked *.