Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/QuickBirdEng/SwiftUI-Architectures
Three different architectures (Model-View, Redux, MVVM) for using SwiftUI implemented at the example of a chat app
https://github.com/QuickBirdEng/SwiftUI-Architectures
architectural-patterns architecture ios ios-swift ios-ui model-view redux swift swiftui swiftui-example swiftui-mvvm
Last synced: 3 months ago
JSON representation
Three different architectures (Model-View, Redux, MVVM) for using SwiftUI implemented at the example of a chat app
- Host: GitHub
- URL: https://github.com/QuickBirdEng/SwiftUI-Architectures
- Owner: QuickBirdEng
- License: mit
- Created: 2019-11-12T13:35:52.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-08T14:20:28.000Z (almost 5 years ago)
- Last Synced: 2024-04-20T14:51:32.071Z (7 months ago)
- Topics: architectural-patterns, architecture, ios, ios-swift, ios-ui, model-view, redux, swift, swiftui, swiftui-example, swiftui-mvvm
- Language: Swift
- Size: 336 KB
- Stars: 666
- Watchers: 18
- Forks: 48
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftUI Architectures: Model-View, Redux & ViewState MVVM
This repository contains implementations of a simple chat client called QBChat. Each implementation uses SwiftUI while applying a different architecture (Model-View, Redux & ViewState MVVM).
More explanation about each SwiftUI architecture example can be found in [this blog article](https://quickbirdstudios.com/blog/swiftui-architecture-redux-mvvm/).
Currently, QBChat is implemented using the following app architectures:### Model-View
![](README/ModelView.jpeg)
The Model-View architecture does not enforce abstraction of business logic from Views similar to the MVC architecture pattern with UIKit.
### Redux
![](README/Redux.jpeg)
In [Redux-like architectures](https://redux.js.org), a global state is used to ensure consistency across all Views being kept in Stores. View components can trigger Actions which are interpreted into state changes by a reducer.
### ViewState MVVM
![](README/MVVM.jpeg)
ViewState MVVM uses separate ViewModels for each View (if required). Instead of a global state and global actions, ViewState MVVM creates a separate ViewModel interface for each View containing a State and different Inputs.
## Author
SwiftUI-Architectures is created with ❤️ by [QuickBird Studios](https://quickbirdstudios.com).
To get more information on the different app architectures check out [our blog post](https://quickbirdstudios.com/blog/swiftui-architecture-redux-mvvm/).
## Contributing
Open an issue if you need help, if you found a bug, or if you want to discuss a feature request.
Open a PR if you want to add other SwiftUI app architectures to the repository or make changes to the different implementations.
## License
SwiftUI-Architectures is released under an MIT license. See [License.md](https://github.com/quickbirdstudios/SwiftUI-Architectures/blob/master/LICENSE) for more information.