
Explore modern Android app architecture, from clean code and dry/solid principles to layered and clean architectures. Learn mvc, mvp, mvvm patterns, components, navigation, and dependency injection for modular apps.
Define clean code and lay a solid foundation for upcoming chapters by exploring popular design principles, including dry and solid, and apply these principles in practice at chapter end.
Define the goals of clean code, explore key system design principles including dry and solid principles, and finish with six demos of the dry principle and five solid principles.
Examine the goals of system design principles to produce clean, readable, and maintainable code with strong testability, separation of concerns, and adherence to dry and solid practices.
Apply the Kiss principle, keep it simple and avoid overengineering, by breaking problems into smaller subproblems and solving them step by step to improve maintainability.
Apply the yagni principle to avoid premature optimization and unnecessary complexity, delivering only what is needed now while seeking user feedback and following the kiss principle.
Explore the SOLID five design principles: single responsibility, open-closed, Liskov substitution, interface segregation, and dependency inversion—originating from uncle Bob's 2000 paper, with a practical app example.
Apply the dry principle by merging shareable and unshareable node managers into one nodes manager, improving maintainability and reducing duplication in loading, saving, deleting, and sharing notes.
Apply the single responsibility principle to refactor the demo app's nodes manager and nodes persistence. Group load, save, and delete with persistence and keep share separate, improving testability and readability.
Explore the open/closed principle by implementing a node persistence interface with file and database persistence, enabling load, save, and delete without modifying existing code.
Explore how the dependency inversion principle decouples models by using interfaces for notes persistence, aligning with open closed principle and Liskov substitution principle to enable simpler testing and faster compilation.
Explore the MVC pattern in Android, where the model handles data, the view renders the UI, and the controller coordinates between them, highlighting separation of concerns and unit testing benefits.
Explore the MVP pattern, where the model provides data, the view renders the UI, and the presenter handles presentation logic and mediates between them to enable testable Android apps.
Discover model-view-intent (MVI): a single immutable state, one-way flow, and a pure reducer that maps intents to new states, with one-off effects.
Explore the MVI pattern by implementing intents, state, and one-time effects in a nodes module, demonstrating load, add, delete, and share actions with snack bar feedback and unidirectional data flow.
Explore VIPER architecture for Android, detailing the five components—view, interactor, presenter, entity, router—each with a single responsibility, interfaces, and testable boundaries that separate the user interface from logic.
See VIPER applied on Android with view, presenter, interactor, and router separation. Explore two features: add node and nodes list, showing interfaces, lifecycle handling, and testable dependencies.
Explore the goals and strategies of clean architecture as defined by Uncle Bob, examine its components, and discuss when to use it with practical use cases.
Explore the goals of clean architecture—development, deployment, operation, and maintenance—to minimize costs, maximize programmer productivity, and leverage modularization with stable interfaces in mobile apps.
Apply clean architecture strategies that keep policies independent from details, enabling flexible technology choices and a cross-platform core. Emphasize vertical and horizontal layering, prudent code duplication, and flexible decoupling modes.
Learn how the UI layer, powered by viewmodels, translates data from the data layer into immutable UI state for rendering, with unidirectional data flow and events via LiveData.
Expose UI state as a time-varying stream using unidirectional data flow, with private mutable and public immutable state, and choose between single or multiple streams for consistency and performance.
Navigate advanced repository topics like nested repositories, model separation, and mapping to return only domain-relevant data, with threading and robust error handling, and plan for workmanager-driven operations.
Explore the domain layer between UI and data, encapsulating business logic in small, single-function use cases that depend on repositories, with safe threading and optional adoption based on project needs.
Learn to implement layered architecture by restructuring UI, domain, and data layers, exposing UI state via the notes ViewModel, and integrating data sources, repositories, reactive APIs, offline-first, and conflict resolution.
Explore the UI and domain layer changes, including a sealed notes UI state with loading, error, and content, exposed via a state flow, and a new sync use case.
Explore layered architecture principles in a notes app, contrasting with clean architecture. See separation of concerns, data layer via repository, and unidirectional state flow with reactive Kotlin flows.
Explore android architecture components across the ui and data layers, from view binding to lifecycle-aware components like ViewModel and LiveData, plus Datastore, Room, WorkManager, and paging.
Discover view binding, a UI library that generates type-safe, null-safe binding classes for XML layouts, enabling safe interaction with views in activities and fragments.
Master advanced data binding topics, including binding adapters, two-way binding with inverse adapters, converters, and integration with LiveData and ViewModel for lifecycle-aware UI.
Learn how the lifecycle API becomes lifecycle aware in Jetpack Compose. Use lifecycle owner, state flows, and lifecycle event and start effects to load notes and render content.
Save UI state in the ViewModel with the SavedStateHandle, a key-value map that persists through process death and restores data after config changes.
Guard UI state across configuration changes and resource constraints with view models and saved state APIs. Persist data to disk when the app closes using room, datastore, or shared preferences.
Explore how the ViewModel persists UI state and handles scoping and lifecycle with a saved state handle and factory, using Kotlin flows for notes: load, add, delete, sync, share.
Compare LiveData and Kotlin flows to manage asynchronous data streams, highlighting lifecycle awareness, threading, backpressure, and transformations, and identify when to use each.
Learn to implement coroutines with Kotlin flows in an Android app using ViewModel and lifecycle scopes, avoid LiveData, and optimize flow collection with hot state flows and lifecycle-aware collection.
Understand the paging library as a multi-layer solution that loads paginated data from network or local storage, with in-memory caching, deduplication, and UI integration.
Discover the navigation controller as the central navigation API that manages the navigation graph and backstack, with remember NavController in Jetpack Compose and findNavController in the view system.
Explore the three destination types in Android app architecture: hosted destinations fill the navigation host, dialogue destinations overlay with independent state, and activity destinations start new activities.
Explore how the navigation controller manages the back stack, pushing destinations on navigate and popping them with navigate up or pop backstack, including save state, inclusive, and single top options.
Explore the navigation graph, a data structure of all destinations and their connections, with hosted, dialogue, and activity destinations, and how it is created for fragments or Jetpack Compose.
Jetpack Compose Navigation is now typesafe - stay tuned for a lecture update!
Discover how the Dynamic Navigator integrates feature models with the navigation component, handling installation and progress UI, while the navigation UI automates top app bar, drawer, and bottom navigation.
Explore dependency injection, decoupling and reusability, and how supplying dependencies from outside enables easier testing with mocks; compare self-creation, service locator, and constructor or field injection.
Explore the service locator pattern as an alternative to dependency injection, where a central locator creates and exposes dependencies to classes on demand, highlighting its decoupling, testing, and scoping trade-offs.
Examine component cohesion and coupling to design maintainable multi-module Android apps. Compare modularization strategies: separation by layer, by feature, and by layer-feature, across multimodal app models with a notes demo.
Apply modularization to the notes app by separating data, domain, and UI layers, adopt Gradle version catalogs, and enable dependency injection with Hilt for decoupled, testable architecture.
Discover Jetpack navigation three, a compose-first backstack driven navigation library with scenes, state scoping, and built-in animations, enabling nested navigation, viewmodel integration, and adaptive layouts.
Take your Android development skills to the next level and become an expert in app architecture. Whether building small apps or large, multimodule projects, mastering Android app architecture is key to creating scalable, maintainable, high-performing applications.
Being an expert in app architecture will also prepare you for a Mobile Tech Lead role, as you will be able to make key architectural decisions, and guide projects toward success. You will also learn crucial system design principles and patterns that will help you excel in mobile system design interviews.
Stefan started developing Android apps - almost from Android's birth - in 2011, and since then had to architect, design, and develop many challenging Android, iOS, and Multiplatform apps. In this course, he wants to share his comprehensive experience with you.
Apps are unique - different apps have different requirements and may require different architectural decisions. This course is designed to provide a solid foundation of architectural principles, explain and compare popular app architectures, and guide in selecting the right architecture based on the given requirements. Despite the course being especially targeted at Android, most concepts also apply to iOS.
About 8 hours of on-demand video content will cover what you need to know to master modern Android app architecture:
Writing Clean Code: Apply best practices and system design principles such as DRY and SOLID to create maintainable, scalable codebases.
Choosing the Right Pattern (MVC, MVP, MVVM): Learn the key differences between Model-View-Controller (MVC), Model-View-Presenter (MVP), and Model-View-ViewModel (MVVM) and choose the right pattern based on app size, complexity, and team needs
Implementing Clean Architecture: Minimize app lifetime maintenance costs and maximize developer productivity
Implementing Layered Architecture: Learn how to separate concerns into data, domain, and UI layers for better maintainability based on Google's recommended app architecture
Using Android Architecture Components: Build scalable apps using Jetpack libraries from the UI to the data layer such as the Lifecycle API, the ViewModel API, LiveData & Flow, Coroutines, SharedPreferences & DataStore, the Room database, the WorkManager API or the Paging library
Implementing Efficient Navigation: Seamlessly handle navigation in complex apps with Android’s navigation component
Applying Dependency Injection (DI): Use popular DI frameworks like Dagger and Hilt, or service locator frameworks such as Kodein and Koin to write cleaner, more testable code with better dependency management
Mastering Modularization: Organize your complex codebase into modules, whether they are based on layers, features, or both for better scalability, respecting the principles of component cohesion and component coupling