Better Programming

Advice for programmers.

Follow publication

Member-only story

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

Manuel Meyer
Better Programming
Published in
12 min readSep 21, 2022
Khipu Code in Action. Image by author

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:

  • Coordinator
  • Router
  • Presenter
  • ViewModel
  • DI-Frameworks

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Manuel Meyer
Manuel Meyer

Written by Manuel Meyer

Freelance Software Developer and Code Strategist.

Write a response