There seems to a new source of hype growing. While iOS/macOS architectures were mainly driven by MVC, MVVM, or Clean Swift (or others) up until now, SwiftUI, introduced two years ago, sets a different paradigm, where many of these architectures don’t perfectly fit in.
Over the years, we’ve experimented with a variety of approaches in order to find the right one for our application, which needs a heavy rework due to architectural and therefore maintenance problems. However, none of the classic approaches really helped, mainly because it’s a pretty large business application with tons of storage entities, where many functionalities shall be reusable in different contexts — with a growing rework of the application using SwiftUI, more and more problems occurred in keeping everything clean and separated.
By chance, and it was pure luck, I noticed something called Swift Composable Architecture (SCA), created by Point-Free. I read some articles and posts, had a look at their website, bought into their program, watched videos, and was increasingly enthusiastic.
While I still don’t really understand everything about the framework and am still focused on the simple use cases, I succeeded in building a couple of views in the meantime, getting a feeling for its benefits for our application.
Because I had wanted a brief getting-started section with some before/after code fragments (actually, I had to watch and read a lot to get into SCA, but perhaps there’s something I missed), I’ll try to share some of my experience with you, in the hope it may help you enter into this architecture a bit easier.
Report Story