4 ms·
> From that point of view there is nothing but messages. Yes this is true. The observable's implemented by Rx is an interesting abstraction that can act as an
by gitgud 7y ago
> From that point of view there is nothing but messages.
Yes this is true. The observable's implemented by Rx is an interesting abstraction that can act as an emitter OR a listener of messages (events).
The events emitted from an Observable can be an object with methods. However, you need to subscribe to the observable to get the object and call those methods.
> To me, it turned out I always expect/require update.
Yes, most systems will need to send updates around to various components in the system. Rx is a great option for these use cases.
> So if there are useful transformation functions to use with Observables I don't know why not to use them in every case.
The complexity of an event-driven system is why you generally shouldn't use them every where. Events inherently make things more complex and harder to debug as dependencies between components become implicit rather than an explicit function call.
My advice is to use Rx to decouple parts of your system. But try to stick with the KISS principle and keep things simple to understand.
[1] https://en.wikipedia.org/wiki/KISS_principle https://en.wikipedia.org/wiki/KISS_principle