Member-only story
The MVI Architecture Pattern in Swift
Architect! With just RxSwift!
You might already be familiar with MVVM even MVVM-C and even (jokes) MVC. But MVI? You might have heard of the Flux, Redux and MobX React patterns and you might not be aware that in native development this is actually MVI.
This article explores a sample project that uses **just** RxSwift for implementation. Wow. But the parts to make this work (while non-trivial) are not that hard…come on!
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 11.4.1, and Swift 5.2.2
Prerequisites:
Terminology
MVI: Model-View-Intent
Redux: an open-source JavaScript library for managing application state
The Motivation
MVI is another architecture that looks at improving the separation of concerns when developing Apps. Those traditional patterns, MVC, MVVM and others (VIPER) are traditionally imperative. The issue is that reactive programming has become more popular, and there is nothing wrong with using RxSwift…