All posts
30 articles on composition, boundaries, naming, testing, and keeping codebases easy to change.
Browse by tagWhere Errors Belong: Use Case Outputs, Not Error Passed Around
Most apps leak Error across boundaries and downcast in ViewModels. Model failures in the use case output vocabulary instead. Swift and Kotlin.
Complex Forms Should Not Make Your ViewModel the Use Case
Architect complex SwiftUI forms with drafts, validators, mappers, form operations, and use cases without making the ViewModel the whole feature.
AI Coding Still Needs Architecture
AI coding tools make architecture more important, not less important. Learn why I give AI agents an ARCHITECTURE.md file before asking them to write code.
Selection Is Not Navigation in Jetpack Compose
Learn how to model list selection in Jetpack Compose without mixing UI state, domain identity, and navigation decisions.
Selection Is Not Navigation in SwiftUI
Learn how to model list selection in SwiftUI without leaking navigation, domain identity, or behavior into the wrong place.
Unidirectional Data Flow in Jetpack Compose
Learn unidirectional data flow in Jetpack Compose with UI state, user intents, use case outputs, and navigation events.
Clean ViewModels in Jetpack Compose
Learn how to keep Jetpack Compose ViewModels focused on UI state, screen events, and presentation mapping.
Dagger Does Not Invert Your Dependencies For You
Learn why Dagger and Hilt wire Android dependencies but do not automatically create healthy dependency direction.
Unidirectional Data Flow in SwiftUI Apps
Learn unidirectional data flow in SwiftUI with view intents, use case outputs, ViewModel state, and flow-owned navigation.
When Is Architecture Actually Overkill?
Learn how to reason about architecture overkill, adapters, dependency inversion, and boundaries in large Swift apps.
Architecture Decisions I Would Avoid in a New SwiftUI App
Learn architecture decisions to avoid in new SwiftUI apps, from global state to over-abstracted networking and hidden dependencies.
Dependency Injection in Swift Without the Ceremony
Learn dependency injection in Swift without ceremony using initializers, factories, environment values, and composition roots.
Factories, Builders, and Composition Roots in Swift
Understand factories, builders, and composition roots in Swift, and learn where each construction pattern belongs.
Feature Modules in iOS: Vertical Slices vs Layers
Learn how to organize iOS feature modules using vertical slices, layers, and boundaries that make change easier.
Protocols Are Not Architecture
Learn why Swift protocols are not architecture by themselves, and how to use them as meaningful boundaries.
How to Refactor Toward Better Architecture Without Rewriting the App
Learn how to refactor an iOS feature toward better architecture gradually, without rewriting the whole app.
The Repository Pattern in Swift: Useful Abstraction or Fancy Wrapper?
Learn when the Repository pattern helps Swift apps, when it becomes a wrapper, and how to design useful data boundaries.
Testing Architecture, Not Implementation Details
Learn how to test architecture in Swift by focusing on behavior, boundaries, contracts, and meaningful composition.
Use Cases in iOS Apps: Helpful Boundary or Extra Layer?
Learn when use cases help iOS architecture, when they add noise, and how to keep them focused in Swift apps.
When MVVM Goes Wrong in SwiftUI
Learn common SwiftUI MVVM mistakes and how to keep ViewModels focused, testable, and easy to compose.
The Composition Root in SwiftUI Apps
Learn the composition root in pure SwiftUI apps using @main App, factories, observable object ownership, NavigationStack, previews, and environment tradeoffs.
The Composition Root in UIKit Apps
Learn the composition root in UIKit apps using SceneDelegate, factories, flows, dependency wiring, and testable boundaries.
Naming Protocols and Implementations in Swift
Practical naming advice for Swift protocols and implementations: avoid Protocol, Impl, Manager, and vague abstractions.
Why Is Bad Code Bad? Readability, Collaboration, and Change
Learn why bad code hurts teams: unclear names, mixed responsibilities, duplication, weak tests, and hidden change costs.
The Flow Pattern in UIKit: Testable Navigation Outside View Controllers
Learn the Flow pattern in UIKit and how it keeps navigation reusable, testable, and separate from view controllers.
Clean MVVM in SwiftUI: Use Cases, ViewModels, and Composition Root
Learn clean MVVM in SwiftUI using use cases, view models, adapters, and composition root wiring.
What Makes Good Software Architecture?
A practical definition of good software architecture: change-friendly, testable, maintainable, and useful to the team.
Practical Polymorphism in Swift: Protocols, Decorators, and Composition
Learn practical polymorphism in Swift using protocols, decorators, strategies, and composition to keep growing codebases maintainable.
The Open-Closed Principle in Swift: Add Behavior Without Breaking Existing Code
Learn the Open-Closed Principle in Swift with practical examples using protocols, composition, strategies, and decorators.
Unidirectional Data Flow in iOS MVP and Clean Architecture
Learn unidirectional data flow in iOS architecture and how it clarifies MVP, use cases, presenters, and domain outputs.