MVVM View Models vs Jetpack ViewModels

Before you get started on your new project, a note about terminology: The view model that is a part of MVVM is not the same as the Jetpack ViewModel class that you learned about in Chapter 4 and Chapter 9. To avoid confusion, we will always format the name of the Jetpack class as “ViewModel” and the MVVM concept as “view model.”

Recall that the Jetpack ViewModel is a specific class for maintaining data in fragments and activities, even across their volatile lifecycles. The view model in MVVM is a more conceptual part of the architecture. View models may be implemented using Jetpack ViewModels, but – as you will see through most of this chapter – they can also be implemented without using the ViewModel class.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.165.66