Software Dev

MVC: Many View Controllers

Another counterpoint in the iOS architecture wars, saying basically that MVC is actually pretty sound as long as you use it wisely.

This post breaks controllers down into a few types: Containers, Generic controllers, View controllers, Flow controllers to help reframe things.

One of my favorite points here is that not everything has to be a model, a view, or a controller. You can — and should — create other kinds of code! No wonder your controllers are messy if you limit yourself like that. 🤷🏻‍♂️

This issue happens when the developer thinks they must fit everything into either M, V or C, forgetting that they are allowed to create other types of constructs.

👉 MVC: Many View Controllers

2

Via iOS Dev Weekly.

Software Dev

State Machines in SwiftUI

An app view that changes its state in complicated ways is difficult to do right. We developers have even been trying to avoid state when possible. But if you really just have to deal with a complex state-driven app view, then embrace it with a state machine.

👉 Building a state-driven app in SwiftUI using state machines

Honestly, this is my favorite programming technique, where the really interesting stuff happens. 👍

Via iOS Dev Weekly.