UI / Presentation Patterns
Patterns for separating concerns in the user interface.
Table of Contents
- MVC (Model-View-Controller): Separates data (Model), UI (View), and logic (Controller). Used in Rails, Django, Spring MVC.
- MVP (Model-View-Presenter): View is passive; Presenter handles all UI logic and mediates between View and Model. Used in GWT, WinForms.
- MVVM (Model-View-ViewModel): Two-way data binding between View and ViewModel. ViewModel is an abstraction of the View. Used in Angular, Vue, WPF.
- VIPER (View-Interactor-Presenter-Entity-Router): Extreme separation of concerns for testability in mobile apps. Used in iOS Enterprise.
- Flux / Redux: Unidirectional data flow. Actions -> Dispatcher -> Store -> View. Used in React, Vuex.
- MVI (Model-View-Intent): Reactive, unidirectional. Intent (User) -> Model (State) -> View (UI). Used in Modern Android.