Reactive programming is more than a technology or library specification. It is an entirely new mindset in how we solve problems. The reason it is so effective and revolutionary is it does not structure our world as a series of states, but rather something that is constantly in motion. Being able to quickly capture the complexity and dynamic nature of movement (rather than state) opens up powerful new possibilities in how we represent things with code.
When I first learned Java and object-oriented programming, I felt it was useful, but not effective enough. Although OOP is useful, I believed it needed to be paired with something else to be truly productive, which is why IÂ keep an eye on C# and Scala. Only a few years later, Java 8 came out, and I put functional programming into practice for the first time.
However, something was still missing. I became fascinated with the idea of a value notifying another value of its change, and an event triggering another event in a domino effect. Was there not a way to model events in a fluent and functional way, much like Java 8 Streams? When I voiced this idea one day, somebody introduced me to reactive programming. What I was looking for was the RxJava Observable, which, at first glance, looked a lot like a Java 8 Stream. The two look and feel similar, but the Observable pushes not just data but also events. At that moment, I found exactly what I was looking for.
For me, as well as many others, a challenge in learning RxJava is the lack of documentation and literature. I was often left experimenting, asking questions on Stack Overflow, and trawling obscure issues on GitHub to become knowledgeable. As I used RxJava heavily for some business problems at work, I wrote several blog articles, sharing my discoveries on topics such as parallelization and concurrency. To my surprise, these articles exploded with traffic. Perhaps this should not have been surprising since these topics were sparsely documented anywhere else. When Packt approached me to write my second book, Learning RxJava, I jumped at the opportunity despite the work involved. Maybe, just maybe, this book can solve the documentation problem once and for all. Every fundamental concept, use case, helpful trick, and "gotcha" can be made accessible, and RxJava will no longer be considered an "advanced topic." I believe RxJava should be made accessible to professional developers of all skill levels, as it effectively makes hard problems easy and easy problems even easier. It may require a bit more abstract understanding, but the immediate productivity gained makes this small hurdle worthwhile.
As far as I know, this is the first published book covering RxJava 2.0, which has many major differences from RxJava 1.0. This book you are reading now is the comprehensive, step-by-step guide that I wish I had. It strives to not cut any corners or present code without thorough explanation. I hope it helps you quickly find value in RxJava, and you become successful in applying it to all your endeavors. If you have any concerns, feedback, or comments, you are welcome to reach out to me at tmnield@outlook.com.
Good luck!
Thomas Nield