Decoupling
Decoupling is the design practice of reducing direct dependencies between software components so they can change, operate, or evolve more independently.
Secrets of the JavaScript Ninja, Second Edition
A design property in which interacting components know little or nothing about one another's internal details or control flow.
- How it is used
- Uses custom DOM events to let shared code announce conditions without naming the code that reacts.
- How deep it goes
- Defines loose coupling, contrasts global callbacks, and demonstrates independent handlers and custom-event signaling.
- Examples
- Demonstrates an AJAX operation whose start and completion events control a spinner and carry URL data.
- What you can do after
- Apply it via CustomEvent, dispatchEvent, and addEventListener to signal operation state to independent listeners.
Read how Secrets of the JavaScript Ninja, Second Edition explains decoupling →
Learn Docker in a Month of Lunches, Second Edition
Decoupling is a design technique that separates communicating components so they do not depend directly on one another.
- How it is used
- Uses a message queue to let senders and receivers communicate asynchronously without direct dependencies.
- How deep it goes
- Demonstrates asynchronous publishing and subscription through Redis containers, including messages sent before a subscriber listens.
- Examples
- Uses a Redis publisher and subscriber on channel21 to demonstrate messages passing through a queue.
- What you can do after
- Apply decoupling by publishing and subscribing through a Redis message queue so components can operate independently.
Read how Learn Docker in a Month of Lunches, Second Edition explains decoupling →
Microsoft Azure in Action
Decoupling is an architectural pattern that reduces direct dependencies between software components so they can operate and scale independently.
- How it is used
- Buffers incoming orders for asynchronous processing so producers and consumers can operate independently.
- How deep it goes
- Explains queue-based separation, steady processing, ordered retrieval, and message retention when retrieval fails.
- Examples
- Uses Banning Books orders queued during busy sales periods for processing by a separate service.
- What you can do after
- Apply it via Azure Queue Storage to separate order creation from processing and accommodate changing input rates.
Related concepts
- don't repeat yourself principleaddressed by · The Don’t Repeat Yourself principle is a software design guideline that gives each piece of knowledge or behavior a single authoritative representation to avoid unnecessary duplication.
- moduleconfigured by · A module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
- interfaceaddressed by · A software interface is a contract or boundary that specifies the operations, properties, or capabilities through which types or components interact, without requiring a particular implementation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


