Using the factory pattern to avoid shared state in Swift — Swift by Sundell

www.swiftbysundell.com

Shared state is a really common source of bugs in most apps. It's what happens when you (accidentally or by design) have multiple parts of a system that rely on the same mutable state. This article takes a look at how shared state can be avoided in many situations, by using the factory pattern to create clearly separated instances that each manage their own state.

Read more...
Linkedin

Want to receive more content like this in your inbox?