
Kickstart Modern Android Development with Jetpack and Kotlin
By :

While developing Android applications, you must have heard of the term ViewModel. If you haven't heard of it, then don't worry – this section aims to clearly illustrate what this component represents and why we need it in the first place.
To summarize, this section will cover the following topics:
Let's start with the first question: what is this ViewModel
that we keep hearing about in Android?
Initially, the ViewModel
was designed to allow developers to persist UI state across configuration changes. In time, the ViewModel
became a way to also recover from edge cases such as system-initiated process death.
However, often, Android apps require you to write code that is responsible for getting the data from the server, transforming it, caching it, and...