event bus
A shared object that parts of an application use to publish events and subscribe to them, so senders and receivers never reference each other directly.
In more detail
In the browser, a class extending EventTarget makes a small typed event bus. It keeps components decoupled, at the cost of making the flow of data harder to trace.
Related terms
- EventTarget — The built-in browser interface for anything that can receive events, providing addEventListener, removeEventListener and dispatchEvent.
- CustomEvent — A browser event type you create and name yourself, which carries any data you like in its detail property.
- loose coupling — Designing parts of a system so they depend on each other as little as possible and can change independently.
Taught in
- EventBridge Rules: The Rule That Matched Nothing — AWS Certified DevOps Engineer – Professional (DOP-C02) Exam Prep
- CustomEvent Dispatching And Decoupled Component Event Buses — Frontend Architecture & Web Platform