Writing
Architectural Patterns – Decorator
The Decorator pattern in Swift: adding behaviour to existing components without changing them, shown through a token-refresh example.
- Clean Architecture
- Composition
- iOS
- Swift
Detect user’s country without accessing their location
How to find out which country an iOS app's user is in, without CoreLocation and without asking for their location.
- iOS
- Swift
DDD – Aggregates part I.
What an aggregate is in Domain Driven Design, and how referencing other entities by ID affects an iOS app's loading speed and memory use.
- Clean Architecture
- Domain Driven Design
Async execution of long-running operations using Swift’s Task
Adopt Swift's Task to run long-running operations on a background thread, without changing the existing implementation of the operation.
- Composition
- Concurrency
- iOS
- Swift
- Actors
- Async
- MainActor
- Task
Use Swift’s ‘async’ without breaking the existing codebase
How to adopt Swift's async/await APIs where they're needed, without breaking or changing the existing codebase.
- Composition
- Concurrency
- iOS
- Swift
- SwiftUI
- Async
How to connect to Wi-Fi device from iOS app using Swift
Connecting an iOS app to a Wi-Fi device with NEHotspotConfigurationManager, and the gotchas along the way.
- iOS
- Hotspot
- Wi-Fi
DDD – When to use and how to design Entities
When to use entities in Domain Driven Design, and how to design them in Swift: unique identity, properties, behaviour and invariants.
- Clean Architecture
- Domain Driven Design
DDD – Understating Value Objects with Swift
How value objects differ from entity objects in Domain Driven Design, and how to define their identity and use them in Swift.
- Clean Architecture
- Domain Driven Design
DDD – Anemic vs. Rich Domain Model
What an anemic domain model is, what its downsides are, and how to refactor it towards a rich domain model, with examples in Swift.
- Clean Architecture
- Domain Driven Design
Observing model changes using Swift’s @propertyWrapper
An alternative way to observe model changes with Swift's @propertyWrapper, compared against didSet, KVO and delegates.
- Swift
How to encapsulate business rules using policies
Encapsulating simple business rules in Swift with policies, instead of hiding them inside methods and properties.
- Swift
A better way to handle weak properties and memory management
Handle memory management in Swift without leaking implementation details into components or reaching for weak properties all over the codebase.
- Swift