Architecture With Nico

Practical software architecture and design for iOS engineers.

Start Here

Software architecture can feel abstract when it is taught as a list of pattern names. The goal of this site is different: to show how architectural ideas change everyday Swift code.

If you are new here, read the articles in this order.

Foundations

  1. What Makes Good Software Architecture? introduces the baseline: architecture is about making change easier, safer, and more predictable.
  2. Why Is Bad Code Bad? explains the human cost of unclear code: slower collaboration, harder debugging, and fragile maintenance.
  3. Naming Protocols and Implementations in Swift shows why names are architectural decisions, not cosmetic details.
  4. Protocols Are Not Architecture sharpens that idea: protocols help only when they express a meaningful boundary.

Composition and Boundaries

  1. The Open-Closed Principle in Swift introduces extension over modification with practical examples.
  2. Practical Polymorphism in Swift is the deepest hands-on article. It shows how protocols, decorators, strategies, and composition work together.
  3. Dependency Injection in Swift Without the Ceremony explains how to make dependencies visible without jumping straight to containers.
  4. Factories, Builders, and Composition Roots in Swift clarifies where construction decisions belong.
  5. Use Cases in iOS Apps explores when use cases are a useful boundary and when they become ceremony.
  6. The Repository Pattern in Swift explains how to keep data access behind useful app-facing boundaries.

Presentation and App Structure

  1. The Composition Root in SwiftUI Apps shows composition using @main App, feature factories, @StateObject, NavigationStack, and previews.
  2. Clean MVVM in SwiftUI shows how ViewModels can stay focused on renderable state and use case outputs.
  3. When MVVM Goes Wrong in SwiftUI covers the failure modes: massive ViewModels, hidden dependencies, and navigation ownership.
  4. Unidirectional Data Flow in iOS MVP and Clean Architecture explains how use cases, presenters, and views can communicate in one direction.
  5. The Composition Root in UIKit Apps explains where UIKit applications should be assembled and how to keep dependency decisions explicit.
  6. The Flow Pattern in UIKit focuses on navigation and why view controllers should not own every journey decision.

Scaling the Codebase

  1. Feature Modules in iOS compares vertical slices and technical layers as the app grows.
  2. Testing Architecture, Not Implementation Details shows how tests can protect behavior and boundaries without freezing every refactor.
  3. How to Refactor Toward Better Architecture Without Rewriting the App gives a gradual path for improving an existing feature.
  4. Architecture Decisions I Would Avoid in a New SwiftUI App pulls the lessons together as practical starting advice for new SwiftUI projects.

The recurring idea is simple: good architecture is not about adding ceremony. It is about giving every important decision a clear home.