MVVM-(X), VIP, VIPER — all these so-called architectures have two things in common: They all trace their ancestry to Robert C. Martin’s Clean Arch

Introducing Khipu: My Boilerplate Code-Free Implementation of Clean Architecture in Swift

submited by
Style Pass
2022-09-22 10:00:04

MVVM-(X), VIP, VIPER — all these so-called architectures have two things in common: They all trace their ancestry to Robert C. Martin’s Clean Architecture. I have not seen one of those being valid architectures in iOS. They do not have absolute independence from the UI (Martin: “The UI has to be an I/O Device“) or allow you to defer decisions to a later point in time, possibly infinitely.

Now, in iOS, the question for a long time was, “Where to put the ViewController” — making the architecture answer questions it should never be bothered with. And with the SwiftUI, this question has shifted to “Building (MVVM|VIPER|VIP) in SwiftUI” — coupling the UI from the get-go to any other code — and violating everything an architecture stands for.

One thing all these non-architectures also have in common is the fact that they all require different objects to be implemented:

Leave a Comment