At upday, we’ve been successfully using the Model-View-ViewModel pattern together with RxJava for more than a year and a half. After sharing with the community a very high-level overview of what this pattern entails, we decided that it’s time to go deeper into the implementation details.
I will present our way of handling Android classes and other 3rd party dependencies, and how we make sure that our code is as unit-testable as possible. I’ll speak about our decision process on how to split classes, may they be Views, ViewModels or DataModels, and the benefits and drawbacks of these separations.
Any non-”Hello World” app will most likely have two things: multiple Activities/Fragments, of which at least one will contain a ListView/RecyclerView. Then I’ll show how we handle lists: how is the data added to the list, and how and who listens and reacts to list items taps.