4 ms·
> Additionally, regarding the observer pattern in my experience that leads to tightly coupled code where you can't always easily trace the line of execution or
by muraiki 11y ago
> Additionally, regarding the observer pattern in my experience that leads to tightly coupled code where you can't always easily trace the line of execution or separate it out later when you need to.
That's definitely a danger. When I use the simpler (compared to Rx) Observables in Knockout.js, I make sure to keep my ViewModels small and single-purpose, which helps address this problem.
When I used RxJS with Cycle.js, you can kind of do something similar using widgets, but it seems like it might be harder since a widget in Cycle isn't supposed to have any domain logic. I know Cycle's author recently posted a fairly large example in use at his company's site, so maybe that shows the way to structure things.