Is our world just a collection of states? No. Then why do all the programming paradigms represent our world as a series of states? Can't we reflect objects that are real, moving, and continuously changing state in programming? These are the questions that have interested me ever since I first learned programming.
When I started working as an Android developer, these questions continued to plague me, but got some friends as well. Why do we need so many loops in an application? Isn't there anything to replace the iterators? Also, for Android applications, we must keep a lot of things in mind, as the processors and RAM in a mobile device are not as powerful as those in your PC. There is often an Out of Memory Exception if you do not structure your projects well. So, if we could have less iterators in our program, the UX will significantly improve, but, how do we do it? How do we replace iterators, and with what?
One fine day, I read a blog post about reactive programming and the ReactiveX Framework, (most probably by Thomas Nield, thanks to him), and it gave me a glimpse of the answers to all my questions. So, I started learning reactive programming.
I found out that the learning curve of reactive programming is very much complex, and many developers out there leave it part way through. Reactive programming is considered an advanced topic in most places. However, I continued my journey toward learning reactive programming, and as a reward for my patience and consistency, I got answers to my questions. RxJava (and all other ReactiveX libraries) represents models just like our real-time world, and, unlike states, they model behavior with moving and continuously changing states. Unlike an iterator pattern, it believes on push mechanism, which will push data/event to the subscriber/observer as it comes, making the programming a lot more easier and a lot more like the human world.
On the other hand, around 2 years ago (in December 2015), when I read a Jetbrains blog (yes, I do read a lot, and write as well) about a new language that will work in JVM, my first thought was, why a new language? So, I started exploring Kotlin, and I fell in love with it. The sole purpose of the language is making programming a lot easier. Whenever someone speaks about the benefits of Kotlin, they talk about handling null pointer exceptions so easily, but there are a lot more advantages; the list is never-ending and continues to grow.
The best thing that can happen to a programmer is combining the Kotlin and ReactiveX Frameworks; Mario Arias did this awesome job for the sake of the Developers Community and started RxKotlin on October 2013.
The only thing that RxKotlin lacks is documentation; I personally believe that the main reason behind the complex learning curve of ReactiveX libraries is a lack of documentation and, mostly, a lack of awareness. I've seen a lot of developers, even with more than 6-8 years of experience who have not heard of reactive programming; I believe this book will have a bigger role in changing this scenario. This book is also a part of my mission (also the mission of Kotlin Kolkata User Group) to spread the use and knowledge of Kotlin as much as possible.
As per as my knowledge, this is the first book that helps you learn reactive programming in Kotlin, covering RxKotlin (precisely RxKotlin 2.0) and the Reactor-Kotlin Framework. It is a step-by-step guide to learn RxKotlin and Reactor-Kotlin with added coverage on Spring and Android. I hope this book will help you find the benefits of Kotlin and reactive programming altogether, and, with the help of this book, you will be able to successfully apply reactive programming to all your Kotlin projects.
If you have any concerns, feedback, or comments, you can contact me through my site http://www.rivuchk.com, or drop an email to rivu@rivuchk.com. Make sure to mention Book Query - Reactive Programming in Kotlin in the subject of the email.