Mobile Architecture Patterns
iOS MVC/MVVM/VIPER, Android MVVM/MVI, React Native vs Flutter vs KMP
Technical Reference & Key Concepts
iOS (Swift) Architecture
- MVC: Default Apple pattern. Massive ViewControllers are the main pain point.
- MVVM: ViewModel holds presentation logic. Better testability, works well with SwiftUI+Combine.
- VIPER: 5 layers (View, Interactor, Presenter, Entity, Router). Overkill for small apps but scales well.
Android Architecture
- MVC: Standard Android pattern. Activities/Fragments become massive.
- MVVM: ViewModel + LiveData/Flow + DataBinding. Official Google recommendation.
- MVI: Unidirectional data flow. Intents -> Model -> State. Great for complex UIs but more boilerplate.
Cross-platform Tradeoffs
- React Native: JavaScript bridge can be a performance bottleneck for animations.
- Flutter: Skia engine, great performance. Larger binary size.
- Kotlin Multiplatform: Shared business logic, native UI. Steep learning curve.