Mobile app architecture patterns provide structured approaches to organizing code, separating concerns, and managing complexity in iOS, Android, Flutter, and cross-platform applications. Unlike web or backend architectures, mobile patterns must address platform-specific constraints like limited resources, offline-first requirements, lifecycle management, and tight coupling between UI and platform APIs. The choice of architecture dramatically impacts testability, maintainability, and the ability to scale features without creating "massive view controller" or "god activity" anti-patterns. Understanding these patterns helps teams build apps that remain flexible and testable as complexity grows, while leveraging platform-specific capabilities like SwiftUI's declarative approach or Jetpack Compose's state hoisting.
What This Cheat Sheet Covers
This topic spans 13 focused tables and 101 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Foundational Presentation Patterns
| Pattern | Example | Description |
|---|---|---|
class UserViewModel: ViewModel() { val user = MutableLiveData<User>() fun loadUser() { ... }} | • ViewModel exposes observable state and commands • View binds to ViewModel updates • most popular pattern for Android (Jetpack) and iOS (SwiftUI/Combine). | |
sealed class Intentdata class ViewState(val items: List<Item>)fun reduce(state: ViewState, intent: Intent): ViewState | • Unidirectional data flow with explicit user intents triggering state reduction • emphasizes immutability and predictable state transitions | |
class UserPresenter(val view: UserView) { fun loadUser() { view.showLoading() }} | • Presenter mediates between View and Model • View is passive interface • common before MVVM rose to dominance • better testability than MVC |