What is MVVM architecture in Android ?
Model-View-ViewModel (ie MVVM) is a template of a client application architecture, proposed by John Gossman as an alternative to MVC and MVP patterns when using Data Binding technology. It based on concept called Separation Of Concern.
Separation Of Concern
This means divide your code into class each with separate well defined responsibilities.
MVVM(Model-View-ViewModel)

UI Controller/ Fragment
This is responsible for any user related task like displaying view and capturing user inputs. It should not have any decision making tasks. When UI controller know that a button has been pressed on screen It gonna pass information to view Model.
ViewModel
It is an abstract class that holds all the data needed for the UI and prepare it for display. It help UI data to survive configuration changes. It is a part of lifecycle library
LiveData
It is an observable data holder class that is lifecycle aware. It is the only way to pass data from our viewModel to UI controller .
Lifecyle awareness
Life cycle awareness means Livedata knows about lifecycle state of its UI controller observer. LiveData uses this information to interact intelligently with fragment and activity. eg. Live Data will only update UI controller that is on the screen. So if fragment goes off the screen the value of livedata will remain same. Though when the screen goes on screen Live data will get the most recent data available.
