Skip to content
Tom Ryan edited this page Jun 2, 2015 · 1 revision

Maintaining State

State is a thorny issue, no matter what you're using.

There should be only one source of truth for any given [collection] of items, whether they be Classes or Structs.

For applications without a disk-based store, this source of truth will be a Singleton, in most cases (although in general Singleton use is generally discouraged).

For applications with a disk-based store (such as CoreData), the source of truth will be calls to that store's API, usually with a non-Singleton based Controller.