RxJava meets Data Binding IV - Farewell Subscriptions
05 Sep 2016A subscription free way of using RxJava.
A subscription free way of using RxJava.
There are several frontend architectures, MVP being popular in Android. However, MVVM fits very nicely with Data Binding. There are ways to take advantage of Data Binding in MVP with some modifications to the architecture. This part explains the advantages of MVVM and presents an example app.
To calculate XOR of integers (i…j), basic approach is to iterate over the range. Intuition says that there must be some pattern involved as numbers are consecutive and turns out there is.
Part 1 showed the origin of RxObservableField and its benefits. This part improves the implementation to solve critical issues like cleaning up of subscriptions/memory leaks.
Getting values from RxJava’s Observables to Views is a problem and often requires boilerplate. We explore how RxJava and Data Binding can be combined to solve this problem. A crude implementation of the RxObservableField class is presented.