The episode starts by outlining common complexities in application architecture, particularly in managing complex app state, ensuring consistent state mutations, building composable units, handling side effects, and enabling testability. These issues hinder scalability and collaboration in larger projects.
It then introduces a new application architecture designed to solve these problems. This architecture is opinionated, dictating how to model app state, apply mutations, and execute side effects. It emphasizes functional programming principles and function composition.
The episode highlights the potential benefits of adopting this approach, emphasizing improved scalability and maintainability. However, it acknowledges that this architecture may not be suitable for all problems and might require viewing the problem from a specific perspective.
The past few weeks we have explored the problem space of application architecture, and tried to uncover the root of what makes it so complicated. We ended up building a moderately complex application in the process, and although it was a bit of a toy example, it accented all of the pain points we encounter when building applications. In particular, we saw:
These are very important problems to solve because they allow us to scale our code base to handle many features and many developers working on the same app. Unfortunately, SwiftUI doesn’t solve these problems for us completely. It gives us many of the tools to solve it for ourselves, but it is up to us to take things the extra mile.
And so today we begin doing just that. We will introduce an application architecture that solves these problems. It’s opinionated in much the same way that SwiftUI is. It tells us exactly how we are supposed to model application state, tells us how mutations are applied to that state, tells us how to execute side effects and more. If we follow these prescriptions some really amazing benefits will start to pop up. And of course, the most important part, this architecture is entirely inspired by functional programming! We will draw inspiration from simple functions and function composition in order to understand how we can solve all of these problems.
We of course don’t claim that this architecture is a panacea and will solve all of your problems, and there will definitely be times where it seems that the problem you are working on simply does not fit this framework. However, we still feel that it’s worth exploring these ideas, and it can also be surprising how many problems can be solved with this architecture if you look at the problem from the right angle.
Skip the extension — just come straight here.
We’ve built a fast, permanent tool you can bookmark and use anytime.
Go To Paywall Unblock Tool