Skip to content

iOS architecture starts with pressure

Architecture is a response to pressure. A pattern earns its cost when it protects behavior from a change, lifetime, test, integration, or ownership problem the product actually has.

Name the pressure first

Field Notes has several different pressures:

FeatureChangeCriticalityExternal dependencyLifetimeUseful boundary
title validationlowhighnoneone commanddomain value or use case
note storagemediumhighdatabaseapp lifetimerepository contract
weather contexthighlownetworkcancellable requestclient contract
editor focusmediumlowUI frameworkone presentationkeep in UI adapter
synchighhighserver and diskbackground and retryexplicit state machine and ports

One architecture label cannot answer all five rows.

Score a proposed boundary

Add a boundary when it buys at least one concrete outcome:

  • a business rule runs without UI, storage, or network setup
  • SwiftUI and UIKit reuse the same application behavior
  • a local adapter replaces a cloud or device dependency
  • cancellation, transaction, authorization, or retry has one owner
  • team ownership or build isolation reduces real coordination cost

Keep code direct when a wrapper only renames a framework call, has one trivial implementation, and protects no rule or volatile dependency.

Draw dependency direction

SwiftUI and UIKit adapters
|
v
application use cases
|
v
domain policies
^
|
storage, network, clock, ID, and device adapters

The arrows represent source dependencies. Runtime calls can travel outward through interfaces owned by the application layer.

Revisit decisions with evidence

Record the pressure, chosen boundary, rejected alternatives, cost, and signal that would trigger review. Folder symmetry and protocol count are not architecture outcomes. Change cost, test distance, failure isolation, and ownership clarity are.

Validation boundary

The scorecard is a design tool, not runtime evidence. Its value must be checked against actual Field Notes changes, tests, build times, failures, and team work.

Series navigation

References