swift-composable-architecture
Recombine
swift-composable-architecture | Recombine | |
---|---|---|
59 | 7 | |
12,609 | 70 | |
0.9% | - | |
9.5 | 3.4 | |
4 days ago | 10 months ago | |
Swift | Swift | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
swift-composable-architecture
-
Kaleidoscope of iOS app architectures
TCA for short. Very scalable, quite promising, quite popular. A decent alternative for MVVM enhanced by the Clean Architecture. You can learn more about it in a Point-Free tutorial and on GitHub.
-
My largest project yet: A fully themable, powerful task manager and daily planner built with SwiftUI. Available on iPhone and iPad for free (no ads, IAP or data collected).
🙏 Built with SwiftUI and The Composable Architecture (TCA): This isn’t a feature, but I just want to express my gratitude to the creators and maintainers of these two frameworks, which have played a huge part in making me fall in love with iOS development.
-
Koji je vas odnos prema alternativnim hype-ovanim paradimama programiranja, frameworcima i tehnologijama?
Razliciti alternativni frameworci i arhitekture - Recimo, na pamet mi padaju Composable Architecture (https://github.com/pointfreeco/swift-composable-architecture) i RIBs arhitektura (https://github.com/uber/RIBs). Ok, ove arhitekture resavaju neke probleme. Ali da li problemi koje te arhitekture resavaju solidan developer ne moze sam da resi bez vendor locka za kreatore tih arhitektura. Jesu one open-source, ali meni je rizik da se vezujem za bilo sta sto sutra moze da prestane da se odrzava.
- SwiftUI Structure and Architecture
-
What design patterns exist and which should I learn for SwiftUI?
I came across this post discussing MVM, MVVM, MVP, and composable architecture.
-
What is a piece of code (or Framework, extension, etc.) that you add in every new project?
At a minimum, Composable Architecture, and now Dependencies from Point-Free.
-
Ideal architecture for an app entirely in SwiftUI? Example code repo would be great
I’ve built a couple of apps with this framework: https://github.com/pointfreeco/swift-composable-architecture
- Use of EnvironmentObjects for sharing ObservableObjects
-
Best way forward coming from the Javascript / Typescript world?
While there are apps that use a Redux-style architecture, the arch is still in its infancy in the community. There are a number of implementations each with their own take on Redux. TCA is probably the one with the most name recognition and documentation.
-
Should You Still Learn UIKit?
Learn it if the project at hand requires it. A lot of older, more mature apps will still use UIKit, so it’s likely if you plan to work an iOS developer job that you will need it. But it’s getting to the point where a lot of the forward thinking shops are already starting to integrate SwiftUI. (Me being one of them) which, btw, a lot of people will say SwiftUI isn’t quite there yet, and I mostly disagree. SwiftUI is good for a great many use cases. Yes, there are still pain points, but you can write most of the apps you’d need to write in SwiftUI. And there are great architectural frameworks out there that actually give SwiftUI an opinionated way to structure apps that is testable and maintainable. Check out pointfreeco’s The Composable Architecture (https://github.com/pointfreeco/swift-composable-architecture)
Recombine
-
SwiftUI architecture
Although I used MVVM-style architectures before, I’m now preferring the centralised store Redux-like architectures. However, The Composable Architecture feels too overbearing for me, and feels more like a framework than a library. I’d advise using more lightweight libraries like Recombine which are easily extensible if you need any additional functionality, or even making your very own store architecture to perfectly fit your needs.
-
My first app is now up on the App Store, Damage Calculator for Pokemon!
Yeah, app architecture in SwiftUI can be really difficult. I’d advise you check out this library - Recombine. It provides a really elegant and lightweight solution to app architecture which I really really enjoy.
-
A blogpost on MVVM Paradigm. Any feedback is appreciated :) Trying to learn swift and was intrigued with this architecture pattern :)
Nice article! I love MVVM, but I find it really hard to auto-discipline with it. In a larger app, I tend to get lost with it quite easily, resulting in spaghetti code where I don’t know what’s modifying what and why such thing isn’t working as it’s supposed to be. Recently, I’ve really been enjoying lightweight Redux-like libraries like Recombine (or direct implementations of it like in Swift with Majid’s articles - they incentivise (not force, unlike something like Swift Composable Architecture which can feel a little overbearing) well-structured and clear code. I’d love to hear your thoughts on it in a blog post!
-
Does everybody just not use MVVM or am I just missing something?
How is Swift Composable Architecture in terms of performance with bigger apps - on the Swift forums I’m always seeing posts about bad performance. Also, with The Composable Architecture, you have side effects in the reducer, which seems counterintuitive. What do you think of a library like ReCombine, which seems a bit cleaner and simpler? I’m interested in these Elm-inspired Redux architectures, but don’t want to jeopardise the user experience. And I still haven’t found one which cleanly integrates with SwiftUI’s Core Data.
- Recombine 1.0: An Elm architecture for SwiftUI
-
I just released version 1.0 of Recombine, a built-for-SwiftUI architecture based on Elm’s that takes type-safety to the max
I agree, I think lensing is a super cool feature – it also makes us want to structure our app state and actions even more (who would want to write @EnvironmentObject var lensedStore: SubStore, when you could write @EnvironmentObject var lensedStore: SubStore?). Lensed states are also required to be equatable in Recombine and discard unnecessary UI updates, so you alleviate SwiftUI's diffing and get those sweet performance benefits.
What are some alternatives?
Clean Architecture for SwiftUI + Combine - SwiftUI sample app using Clean Architecture. Examples of working with CoreData persistence, networking, dependency injection, unit testing, and more.
swift-parsing - A library for turning nebulous data into well-structured data, with a focus on composition, performance, generality, and ergonomics.
redux - A JS library for predictable global state management
SwiftState - Redux-Like unidirectional data flow for SwiftUI with a Redux-Saga-like side effect model
tca-swiftui-navigation-demo - Demo project that shows how to implement navigation in SwiftUI iOS application using Swift Composable Architecture
iOS-Viper-Architecture - This repository contains a detailed sample app that implements VIPER architecture in iOS using libraries and frameworks like Alamofire, AlamofireImage, PKHUD, CoreData etc.
GRDB.swift - A toolkit for SQLite databases, with a focus on application development
TCA-tutorial
MVVM.Demo - This is a demo application used to educate and interview iOS Engineers using UIKit.
VIPER Module Generator - A Swift 4.2 VIPER Module Boilerplate Generator with predefined functions and a BaseViewProtocol.
Tempura - A holistic approach to iOS development, inspired by Redux and MVVM
ReSwift - Unidirectional Data Flow in Swift - Inspired by Redux