Closed rgbkrk closed 8 years ago
Is the decision between a single event bus observable for all types vs an observable for each event type?
Is the decision between a single event bus observable for all types vs an observable for each event type?
How would you structure the single event bus observable? Top level object with the event name?
This may be more a question for stack overflow but I'll give my opinion. Keeping in mind I am not a contribute.
Having worked with signals for many years, and implementing reactivity with them, I can say you don't want a unified bus.
Object orientate each event type with its own observable. With an object for each event type you can see at a glance what code depends on what events.
But i guess this assumes dependency injection such as in angular (or robotlegs back in the day).
If you have crosscutting concerns you will want these observables to be part of a multiton, or otherwise factoried from some common point, so that you are aware of all instances. In short crosscutting is still not an argument for an event bus as such.
Closing this issue as stale.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Is the right/standard thing to do to create many
Observable
s?How about for emitting - a series of
Subscriber
s?