ViewModel from Android Architecture Components is a long-awaited solution from Google to address android application architecture, and it packs some really nice features too. A fine new addition to the set of essential android development tools that we use here at Chili (alongside Dagger, RxJava, Data Binding Library). But making the new kid to play nice with the others is not always as easy as it seems.

The structure of this article reflects my thought process (with questions and ideas that arose along the way) and results in a final solution of how to make ViewModel work well with dependency…

Aleksandrs Orlovs

Co-founder & Android developer @ Chili Labs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store