Android Architecture Components (Jetpack లో భాగం) అనేవి బలమైన, నిర్వహించదగిన అనువర్తనాలను రూపొందించడానికి సహాయపడే లైబ్రరీలు — ViewModel (జీవన చక్రానికి అనుగుణమైన స్థితి), LiveData/StateFlow (గమనించదగిన డేటా), మరియు Room (డేటాబేస్ సంగ్రహణ). అవి సిఫారసు చేయబడిన ఆర్కిటెక్చర్ నమూనాలకు మద్దతు ఇస్తాయి.
ViewModel — జీవన చక్రానికి అనుగుణమైన స్థితి కలిగిన
VIEWMODEL holds UI-related state and logic, SURVIVING configuration changes:
→ state stored in a ViewModel SURVIVES screen rotation (the activity recreates, but the
ViewModel persists) → solves the lost-state-on-rotation problem
→ separates UI logic from the Activity/Fragment (the View just observes/displays)
