The Many Flavors of Unidirectional Architectures in Swift

<p><a href="https://medium.com/jobandtalenteng/ios-architecture-an-state-container-based-approach-4f1a9b00b82e" rel="noopener">Back in 2017, I wrote about the concept of &ldquo;State Containers&rdquo;</a>. Six years later, I still like to build most of my apps around them, using the very same concept for the two main layers inside my apps:</p> <ul> <li><strong>The view layer</strong>: a view model is a &ldquo;view state container&rdquo; modeling view-specific state and business logic.</li> <li><strong>The domain layer</strong>: usually aggregate root models (or data repositories/services), representing the business rules and keeping the integrity and consistency around a specific bounded context (or entity) in the application.</li> </ul> <p>A lot has changed since 2017, though. In 2019, Apple introduced SwiftUI. Two years later, async/await came along. While we always like to think of good architectures as those not coupled to the specifics of the framework, good architectures are also good citizens of those same frameworks and the general ecosystem. So&hellip;&nbsp;<strong>How have SwiftUI and async/await changed the concept of state containers in these last six years?</strong>&nbsp;Let&rsquo;s see.</p> <p><a href="https://betterprogramming.pub/different-flavors-of-unidirectional-architectures-in-swift-781a01380ef6"><strong>Website</strong></a></p>