View Model

GPTKB entity

Statements (57)
Predicate Object
gptkbp:instance_of gptkb:architecture
gptkbp:can_be_combined_with Room database
gptkbp:can_be_injected with Dependency Injection frameworks
gptkbp:can_be_used_with gptkb:Data
gptkb:Live_Data
Coroutines
gptkbp:can_provide UI-related data
gptkbp:constructed_in View Model Provider.get()
gptkbp:created_by gptkb:View_Model_Provider._New_Instance_Factory
gptkb:Zentradi
View Model Provider. Android View Model Factory
gptkbp:designed_for UI-related data persistence
gptkbp:held_in multiple Live Data objects
https://www.w3.org/2000/01/rdf-schema#label View Model
gptkbp:is a service
a presenter
lifecycle-aware
not destroyed on configuration changes
a View
a controller
a data model
a data repository
a model class
a singleton
responsible for UI logic
responsible for UI rendering
gptkbp:is_cleared_when associated Lifecycle Owner is destroyed
gptkbp:is_compatible_with gptkb:Jetpack_Compose
Fragment and Activity
gptkbp:is_divided_into UI data from business logic
gptkbp:is_lifecycle_aware gptkb:true
gptkbp:is_often_accompanied_by between multiple fragments
gptkbp:is_part_of gptkb:Android_Jetpack
Android's architecture components
MVVM architecture
Android's MVVM pattern
gptkbp:is_recommended_for complex UI data management
data that needs to survive configuration changes
gptkbp:is_tested_for gptkb:true
gptkbp:is_used_for data preparation for UI
gptkbp:is_used_to handle configuration changes
manage UI-related data
handle user interactions
hold UI state
observe Live Data changes
gptkbp:lifecycle_aware gptkb:true
gptkbp:maintains data during configuration changes
gptkbp:provides data to UI controllers
gptkbp:replaces gptkb:View_Model_Store
gptkbp:scope gptkb:Lifecycle_Owner
gptkb:View_Model_Store
Activity or Fragment lifecycle
gptkbp:supports data sharing between fragments
gptkbp:type_of Android View Model
gptkbp:used_in Android applications
gptkbp:bfsParent gptkb:architecture
gptkbp:bfsLayer 3