Why you should be doing Functional Reactive Programming

From an Android Developer perspective

Let me start by saying that Functional Reactive Programming is hard when you come from an imperative mindset, but once you overcome the steep learning curve, it can save time, make for a cleaner, more robust, and maintainable code base.

So let’s take a closer look at a few advantages

There are some disadvantages though

Not everything is good

The steep learning curve is not only because of the libraries, but also thinking reactively and using FRP to solve problems. It’s easy to not properly handle subscriptions and accidentally leak memory; Although being lightweight, RxJava still adds a good amount of methods towards the dex limit (with over 3500 methods);

Wrapping it up

It’s not that hard, I’ve written an article a few months ago explaining the basics and you’ll see from the samples that it’s not that difficult to start using it. It does have a little bit of a high method count but it’s worth it. The memory leaks can be avoided with the cool RxLifecycle library from the guys at trello.