Modern Android App Architecture

Learn about best practices and recommended Architecture for building robust, production-quality apps.

 

Why invest in app architecture?

Video Optional

How do you build a successful app? Our advice: think like a building architect. If you need help getting started, we have the perfect blueprint for success when building on Android. Check out our updated guide to Android App Architecture, and build something that your users will love.

Architecture Overview

Article

Understand why designing a good app Architecture matters. Learn about common architectural principles, the recommended app architecture, how to manage dependencies between components, and general best practices.

UI Layer

Article

Learn about the role of the UI layer, how to define, manage, expose, and consume UI state using the principles of Unidirectional Data Flow, and how to show in-progress operations and errors on the screen.

The UI layer - MAD Skills

Video Optional

Get an overview of UI state representation, production and consumption all within the context of a unidirectional data flow app.

Data Layer

Article

Learn about the role of the Data layer, the different entities involved, the APIs to expose, threading, how to define a source of truth, the different types of data operations, how to test this layer, and examples of common tasks this layer usually performs.

The Data layer - MAD Skills

Video Optional

Learn about the data layer and its two basic components: repositories and data sources. We'll also cover data immutability, error handling, threading, testing and more tricks and recommendations.

Domain Layer

Article

Learn about the role of the Domain layer, why it's optional and when you should need it, how to better invoke use cases, and examples of common tasks this layer could perform.

The Domain layer - MAD Skills

Video Optional

Learn how the domain layer can simplify your app architecture, making it easier to understand and test.

Handling UI events

Article

Learn how to handle different types of UI events in the UI layer for events that are triggered both by the user or parts of your code. Also, learn what to do if your use case seems to be different from the ones covered in this page.

Handling UI events - MAD Skills

Video Optional

Learn about the different types of UI events, the best practices for handling them, and more!

Build an offline-first app

Article

This guide helps you design your app to properly handle reads, writes, syncs, and conflict resolution on devices with no Internet connectivity.

State holders and UI state

Article

Take a closer look at state holders and how to deal with the different types of state and logic in the UI layer.

State production

Article

Learn best practices about how to model and expose UI state depending on the sources of state change.

Recommendations for Android architecture

Article

Page that consolidates and centralizes important best practices you can find in our documentation.