Architecture POC #958
Replies: 1 comment
-
I knew that it would only be a matter of time before someone suggested TCA, especially since I feel like it's gained a lot of prominence lately. I've only personally dabbled in TCA and had a couple talks about it among my local dev group. It is great but very much has a steep learning curve, especially for beginners. It's also a framework that eventually becomes "all or nothing" in a project, which I'm fine with but that transition would be very arduous and distracting. I would only be open to such a large transition if we previously have a few people putting in multiple hours per week in the project and have enough knowledge of the app's features and design. I just frankly don't have the time or motivation to implement or oversee such a transition right now. I do think TCA is great and does come with a lot of features, I've specially noted swift-perception which we could do as the first step towards TCA (since I think that can be used separately). Edit: On some specifics, we should eventually move away from Stinsen, however I strongly prefer a coordinator pattern over the way SwiftUI/TCA does it. I've looked at many repos that offer a similar pattern and may switch to one of those. Stinsen just hasn't received a lot of development lately (even though I have some rights on it so I could do it) but I like the simplicity of other packages that I've seen. The biggest kicker is that it still uses The |
Beta Was this translation helpful? Give feedback.
-
I saw that #957 was trying to restructure the current ViewModel, so I opened a discussion.
I personally would like to see the structure changed to TCA.
I think TCA has a lot of advantages that make it a good fit for our project.
such as the large number of developers using it and the low learning curve for new contributors to see our code due to its already established structure, which makes it easier for them to detect a Code Structure and feel comfortable contributing.
Of course, a pure View ViewModel pattern might have less of a learning curve, but I think it's hard to drive specific Code Structures and patterns.
And then there are the ancillary benefits: Swift-friendly patterns, State management, Convenient concurrency handling,
Composition
such asifLet
switch
forEach
reducer builders and operators, navigation, DI, performance, testability and the benefits of a unidirectional architecturePersonally, I've been using TCA on personal and company projects and I'm very satisfied with it.
As a side note, We can also take TCA's Path Reducer pattern to replace stinsen.
And in today's timely update made it easier to apply the Observation tool. 😄
Of course, changing all our code to be TCA-based can be a very long and arduous task.
But once you have a solid structure in place, it will be better for the future of your project.
If you're interested, I'll do my best to help.
Beta Was this translation helpful? Give feedback.
All reactions