Architecture For iOS & Android Apps: MVI - The Model-View-Intent in SwiftUI and Android Apps
What is Model-View-Intent (MVI) Patterns?
MVI belongs to the Model-View-* architectural design patterns. Model-View-*
family includes:
- Model-View-Controller (MVC)
- Model-View-Presenter (MVP)
- Model-View-View-Model (MVVM)
- Model-View-Intent (MVI)
MVI is similar to Model-View-Presenter but with added Intents. This MV*
pattern can be use in the presentation layer of a Layered Architecture
designs. The controller defines functionality that can communicate with other
layers of a project. For example a controller can query or persist something
to the database-layer via Interactors. The Presenter is a controller but with
a state that a view can observe. A ViewModel is a presenter too.
MVI evolves from MVP. MVVM evolves from MVP. MVP evolves from MVC.
You can checkout my code example at Re-architect MVVM to MVI
Comments
Post a Comment