A good architecture is crucial to the maintainability, testability, and consistency of an application.
With the introduction of SwiftUI, Apple has taken a giant step towards Declarative UI which is quite appreciated in the community. However, there is a catch: it is breaking many existing app architectures relying on UIKit’s imperative style. The reason: SwiftUI is declarative. As a result, switching to SwiftUI forces us to adapt our app architecture. The question is: How?!
In this workshop, we try out a few app architectures in a sample project and then move on to explore their advantages and disadvantages. We compare a Model-View architecture with a Redux-like architecture and introduce a new architectural approach we call ViewState-MVVM.
What you learn: Through experimenting, you develop a better understanding of what’s different in SwiftUI and how you can adapt your existing architecture to work well with SwiftUI.
Prerequisites: Understanding of SwiftUI concepts such as View, State, Binding, ObservableObject, etc.