Highway
Highway is implementation of Redux-like architecture pattern using Swift.
If you were looking for a something like this:
- TEA (The Elm Architecture)
- MVU (Model-View-Update)
- MVI (Model-View-Intent)
- Redux-like
- Flux-like
- UDF (Unidirectional Data Flow)
- e.t.c
...but on Swift. Then you have found it!
Features
- Multistore support (single state sharing)
- Fast state change and sync
- 100% business logic code coverage
- Lightweight
- Do not use 3rd party libraries
- Can be used with SwiftUI
- Support structs & classes for state (structs preferred)
Examples
- Counter: Lighweight multi store app (Single view controller with multiple child view controller)
- SwiftUI: SwiftUI View with updates
- SocketPingPong: An app with stream of events (like web socket or server side events)
- ReusableViewControllers: Reuse view controller or view which was written with imperative style
- Animation: View animation triggered by state change
- TableViewsSync: TableView with animations (deletions/insertions) and syncronisation (run on iPad)
- InfiniteScroll: Enterprise solution app (with Dependency Injection, Flow Coordinator e.t.c.) (run on iPad)
preview_low.mov
Other
Requirements
- iOS: 13.0
- Swift: 5.4
Installation (Cocoapods / SPM)
Highway is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Highway'
Also you can integrate framework as SPM package
Alternatives
TODO:
- Visual Scheme
- App tests examples (E2E, Unit)
- Update UIStack to UITableView in Animation example
- Reusable views with ViewStore
- UIView modules
- Collapsable UITableView
Author
Dmitrii Cooler, [email protected]
Credits and thanks
The following people gave feedback on the library at its early stages and helped make the library what it is today:
Special thanks to:
- Aleksey Alekseev who helped me to imporve library peformance
- Dmitii Bobrov with major feedback on early concepts
License
Highway is available under the MIT license. See the LICENSE file for more info.