Skip to content

Android, MVVM, and Repositories in the Real World

MVVM Diagram

How do you achieve a responsive user interface while keeping your code clean, precise, readable, and maintainable? This is a question that has been bouncing around the brains of Android developers since 2008.

After many years of letting Android developers figure it out on their own, Google has recently given some guidance on the topic with their Guide to app architecture that promotes a variant of MVVM. While this is a great start, it leaves a lot of questions lingering for teams to answer on their own. Google also provides libraries like LiveData, Room, and DataBinding to help us reduce boilerplates and separate our code’s concerns. Even third parties have lent a helping hand with RxJava and Retrofit, which gives us an easy way to handle asynchronous work and fetch things over the network. With all of these things floating around solving small pieces of the larger question, how can we bring them all together to provide a fluid UI experience that is simple to implement and maintain?

Full article on DraftKings Engineering Blog