Design patterns are named, reusable solutions to common design problems. Their names make tradeoffs easier to discuss, but recognizing a pattern is only the beginning. Each article below develops its contracts, implementation, failure paths, and testing strategy in Swift.

Many classic patterns come from the 1994 “Gang of Four” book, Design Patterns. Some are built right into Swift and Apple’s frameworks (delegation, observers, singletons), while others need a Swift-flavored twist with protocols, closures, and value types.

The dedicated examples use a Swift 5.7 baseline, released on September 12, 2022. The coordinator example requires iOS 16 or macOS 13 for NavigationStack. Related articles on delegation, observers, iteration, strategy, and dependency injection state their own language context.

Read the examples in order within each article: later Swift blocks extend the earlier definitions and include executable assertions. Diagrams show ownership, dispatch, and state transitions; equations appear where resource accounting or representation cost benefits from a precise model.

Article available Coming soon

1. Creational Patterns

How objects get created:

2. Structural Patterns

How objects are composed into bigger structures:

3. Behavioral Patterns

How objects communicate and share responsibilities:

4. App-Level Patterns

Patterns that shape how a whole app or feature is organized:

Looking for MVC, MVVM, and friends? They have a guide of their own: see Architectures.

Up next

Architectures

This guide grows with the blog: new articles are linked here as soon as they're published. Missing something? Let me know.

← Back to all roadmaps