mksantoki / MVVMDEMO

Simple MVVM Demo Application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Model-View-ViewModel

  • The View — that informs the ViewModel about the user’s actions
  • The ViewModel — exposes streams of data relevant to the View
  • The DataModel — abstracts the data source. The ViewModel works with the DataModel to get and save the data.

Flow 1

Flow 1
  • View -> View will your activity or fragment
  • ViewModel -> ViewModel is used to transfer data between view and datamodel
  • DataModel -> Datamodel is used to perform business login
  • Model -> Mode class is a structure of data

Flow 2

-> View (Activity/Fragment) request to ViewModel. ViewModel request to the repository. repository request data according to requirements like offline data and online data. Offline data (Model) means database or static data. Remote data means API calls and other online data storage.

About

Simple MVVM Demo Application


Languages

Language:Java 100.0%