top | item 10825795

(no title)

amm | 10 years ago

(Global) notifications are sometimes the only sane way to deliver a message from one part of your application to another one without explicitly wiring them together. If you're working with some kind of plugin system they're also incredibly useful to deliver state updates to plugged-in components.

Once your codebase reaches a certain size, an event bus is a very powerful pattern that, if applied correctly, will keep your classes/functions/... decoupled.

Naturally, there is a huge potential for misuse, but that argument probably applies to any design pattern.

discuss

order

No comments yet.