Uploaded July 2015 | Updated September 2026, 1 week ago
Last video, we covered the revealing module pattern - where we expose an API allowing modules to talk to each other. This works well for smaller amounts of modules, but can have issues when many modules need to talk to each other.
Here's the pubsub code I'm using in this example: gist.github.com/learncodeacademy/777349747d8382bfb722
In this video, we'll cover the pubsub design pattern (publish/subscribe), which allows us to decouple our modules. Once integrated with our pubsub module, they can emit events and not have to worry about which modules depend on them. Modules can subscribe to events and be notified when any module publishes.
-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-
Last video, we covered the revealing module pattern - where we expose an API allowing modules to talk to each other. This works well for smaller amounts of modules, but can have issues when many modules need to talk to each other.
Here's the pubsub code I'm using in this example: gist.github.com/learncodeacademy/777349747d8382bfb722
In this video, we'll cover the pubsub design pattern (publish/subscribe), which allows us to decouple our modules. Once integrated with our pubsub module, they can emit events and not have to worry about which modules depend on them. Modules can subscribe to events and be notified when any module publishes.
-~-~~-~~~-~~-~-
Also watch: "Responsive Design Tutorial - Tips for making web sites look great on any device"
youtube.com/watch?v=fgOO9YUFlGI
-~-~~-~~~-~~-~-










