tezvyn:

Explain the roles of ViewModel, Repository, and data source in MVVM

Source: developer.android.combeginner

Tests your grasp of unidirectional data flow and separation of concerns in Android MVVM. A strong answer maps ViewModel to UI state, Repository to data coordination, and Room or Retrofit to I/O.

This tests whether you understand unidirectional data flow and separation of concerns across Android MVVM layers. A strong answer explains that the ViewModel exposes UI state and handles user events without knowing data origins; the Repository abstracts multiple data sources and decides whether to serve cached Room data or fresh Retrofit network responses; and the data source performs actual disk or network I/O.

Read the original → developer.android.com

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Explain the roles of ViewModel, Repository, and data source in MVVM · Tezvyn