A beginner’s guide to Android Architecture Components

Mina Samy
1 min readFeb 23, 2018

--

Hello, this is a series of posts about Android Architecture Components, we’ll explore them through very simple examples, I’ll try to explain how each component works individually and how we can use them together.

Motivation for using Architecture Components:

Architecture Components were developed with the aim of developing Android apps that have loosely coupled components and thus more maintainable and testable.

For achieving the above the Architecture Components aims to tackle two of the most common challenges in our applications:

  • Managing Activity/Fragment Lifecycle.
  • Data Persistence

To summarize, Architecture components are about retrieving date from a source (Database, REST API, …), updating the UI with this data in a way that’s aware of the UI (Activity/Fragment) life cycle events.

The Architecture components are:

  • Lifecycle
  • LiveData
  • ViewModel
  • Room
  • Paging Library

In the next posts we will explore each of the first three components separately, we will not get into Room or the Paging Library for now. In the end we’ll see how we can integrate all of them together.

--

--