11 ms·
Hey John!! Couldn't agree more. We had an event bus in an early implementation of our application and it was a huge pain later when we didn't know every place
by wesleytodd 10y ago
Hey John!! Couldn't agree more.
We had an event bus in an early implementation of our application and it was a huge pain later when we didn't know every place that was using and relying on a given event.
We switched to a much more explicit structure with defined dependencies and more boilerplate to reduce the "magic". It is much easier to debug and maintain over the long haul. The boilerplate stuff sucks to write, but when you are going to maintain the application for more than a few months, it takes MUCH less time to go back and understand than the alternatives.
- pheeney 10y agoWould it be possible to write some pseudocode on how you converted some of your code? I am trying to avoid some "magic" as well but not certain how to handle some of these dependencies.