Android Architecture Components: ViewModel

Why should I use ViewModel? Suppose I have an activity. I have a presenter class of this activity (MVP design pattern) from which I am downloading data from server. But before getting data from server, unfortunately I rotated the phone. What will happen now? Activity will be recreated, which means the presenter object will be recreated. Here again for getting data, presenter will call server … Continue reading Android Architecture Components: ViewModel

Android Architecture Components: Introduction

This tutorial is an introduction to Android Architecture Components which will help us to understand why should we learn it. What is Android Architecture Components ? Android architecture components are a collection of libraries that help you design robust, testable, and maintainable apps. It is part of Android Jetpack. Why to use Android Architecture Components ? Building robust Android Application Building testable android application Reducing … Continue reading Android Architecture Components: Introduction