Reactive Programming and MVC (2014)
A few problems I personally have with Rx are:<p>- 99.9999% of examples and tutorials on the internet fit one page of code. It&#x27;s enough to look at something more complex, and you get immediately lost, because:<p>- Rx is very good at modelling streams that go <i>in one direction</i>, from A to B. From B to C. The to D etc. The moment you need the results of computation in C back in A... Oh, yikes. You start having Subjects everywhere (or BehaviourSubjects? Or ReplaySubjects? Or AsyncSubjects?) which may and will (if you are just starting learning these things) become extremely messy<p>- Rx may be easily viewed as async programming. Because your transformations happen at some unspecified non-deterministic point in time (and a lot of operations <i>are</i> async). So, debugging is hell. RxJS and (IMO) RxJava have tried to improve this, but it&#x27;s still a mess. Properly structuring your code and streams so that you understand why and when a certain something happens? No one teaches you that. And you need that because your `.map(transform)` has no idea when and who invoked it. Etc.<p>- it doesn&#x27;t help that Rx has cold and hot observables that <i>everyone</i> gets burned by. And I mean <i>everyone</i>. Oversubscription? Undersubscription? Events not firing? Events firing multiple times? These all happen. And some stream libraries go as far as not having cold observables at all. Good article about that: <a href="https:&#x2F;&#x2F;staltz.com&#x2F;cold-and-hot-callbacks.html" rel="nofollow">https:&#x2F;&#x2F;staltz.com&#x2F;cold-and-hot-callbacks.html</a><p>- even such a fundamental thing as the concept of time may be screwed. See a primer on schedulers: <a href="https:&#x2F;&#x2F;staltz.com&#x2F;primer-on-rxjs-schedulers.html" rel="nofollow">https:&#x2F;&#x2F;staltz.com&#x2F;primer-on-rxjs-schedulers.html</a><p>- My favourite thing: everyone tells you how easy and simple Rx is: it&#x27;s just observables. In his book on RxJava the <i>creator</i> of RxJava says that it took him several <i>months</i> to understand Rx. While being tutored by one of the <i>creators of ReactiveX</i>. It&#x27;s &quot;easy and simple&quot; in the same sense as &quot;Haskell is easy and simple&quot; or &quot;rocket science is simple and easy&quot; or &lt;any branch of human knowledge&gt; is simple and easy once you know and understand it.<p>All in all, streams of things are a good idea. Splitting your work into small isolated side-effect free chunks of work is a good idea. With Rx though, unless you are bright yourself or you have someone to mentor you, Rx is an unassailable bastion.