O'Reilly logo

JavaScript at Scale by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Traceable component communication

Perhaps the biggest challenge with large-scale JavaScript applications is keeping a mental-model of where events start and where they end, in other words, tracing the event as it flows through our components. Untraceable code puts the scalability of our software at risk because we cannot predict what will happen in response to a given event.

There are a number of tactics we can use during development to ease the pain of figuring out our event flow, perhaps even modifying the design to simplify things. Simplicity scales, and we can't simplify what we don't understand.

Subscribing to events

One nice aspect of the publish-subscribe messaging model is that we can jump in and add a new subscription. This means that if ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required