How to go beyond simple SwiftUI architecture recipes

Matteo Manferdini3 min read

,

If you feel lost when looking at your SwiftUI codebase, there are a few straightforward techniques you can apply to reign in complexity in your project.

If you want the most bang for your buck, you should start modularizing your SwiftUI views, since that’s where most complexity tends to accumulate.

If you don’t know where to start, I wrote an article outlining 3 strategies that will help you make your SwiftUI views more reusable.

However, that’s just the beginning, and such techniques can only take you so far.

If you want to dig deeper and move beyond simple recipes, you have to understand the software design principles behind these techniques.

But why should you do that in the first place?

While we enjoy the craft of software design, these principles don’t exist for mere fun. They were actually invented to solve specific problems that often occur in software development.

The overarching theme, then, is that those principles exist to make the life of the developer, your life, easier.

❝ Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. [Therefore,] making it easy to read makes it easier to write. ❞

― Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship

Even, and I would say, especially, in the era of AI slop, the developer remains the ultimate user of a codebase.

And while some developers misleadingly brag online about shipping AI code they never read, that is just irresponsible and results in the many AI disasters you read about in the news.

Ironically, this is even creating a completely new problem called cognitive debt, leading to developers who don’t even know what to ask their coding agent because they haven’t the slightest idea of how their codebase works.

Clearly, reading and understanding code remain fundamental skills for software developers. Even more valuable is the ability to fix unstructured and unreadable code, whether that was generated by a machine or written by a person (likely, you).

That is why I put together a 6-day surgical audit that gives you the exact SwiftUI best practices and patterns used by Senior iOS developers to keep codebases clean, modular, and resistant to breaking changes.

The SwiftUI Architecture Audit comprises 6 lessons that cover the most important architectural principles for refactoring messy code into a well-structured codebase.

This mini-course is ideal for any developer who jumped straight into building apps and now wants to fill in the missing pieces that have been keeping them from properly “getting it”.

Each lesson is made of three straightforward sections highlighting:

  • A common architectural problem.
  • The software design principle that fixes it.
  • A straightforward example you can immediately apply to your code.

This is what The SwiftUI Architecture Audit contains:

Day 1 – Long Methods and Deep Nesting: The simple heuristics to start identifying architectural issues in your code

Day 2 – The Separation of Concerns Principle: Creating modular SwiftUI views that are easily previewable

Day 3 – The Law of Demeter: Making your SwiftUI views reusable and resistant to breaking changes

Day 4 – The Information Hiding Principle: How encapsulation prevents assumptions that cause code to break

Day 5 – The Model-View-Controller Pattern: The blueprint underlying every well-structured SwiftUI app

Day 6 – Beyond MVC: Expanding your app’s architectural layers to extract the app logic from SwiftUI views

You can join The SwiftUI Architecture Audit here at the price of a large coffee.

Copyright © 2026 Pure Creek, All rights reserved.
4 links in this issue

Sent by Matteo Manferdini Newsletter. Links that track readers or name the subscriber were removed from this copy; its images still load from the sender's own servers. If you publish this newsletter and want an issue corrected or removed, write to us.