Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marty-suzuki/iosdesignpatternsamples
This is Github user search demo app which made by many variety of design patterns. You can compare differences in MVC, MVP, MVVM and Flux.
https://github.com/marty-suzuki/iosdesignpatternsamples
design-patterns flux ios mvc mvp mvvm
Last synced: 1 day ago
JSON representation
This is Github user search demo app which made by many variety of design patterns. You can compare differences in MVC, MVP, MVVM and Flux.
- Host: GitHub
- URL: https://github.com/marty-suzuki/iosdesignpatternsamples
- Owner: marty-suzuki
- License: mit
- Created: 2017-08-06T12:14:35.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2021-02-14T04:26:40.000Z (over 3 years ago)
- Last Synced: 2024-10-30T08:51:29.111Z (15 days ago)
- Topics: design-patterns, flux, ios, mvc, mvp, mvvm
- Language: Swift
- Homepage:
- Size: 80.5 MB
- Stars: 689
- Watchers: 23
- Forks: 92
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# iOSDesignPatternSamples
This is Github user search demo app which made by many variety of design patterns.
![](./Images/app.gif)
## Application Structure
![](./Images/structure.png)
- SearchViewController... Search Github user with query.
- UserRepositoryViewController... Show repositories of user who selected in SearchViewController.
- RepositoryViewController... Show a repository which selected in UserRepositoryViewController or FavoriteViewController. In addition, add / remove favorite repositories on memory.
- FavoriteViewController... Show favorite repositories which stored on memory.## Design Patterns
- ### [MVC](https://github.com/marty-suzuki/iOSDesignPatternSamples/tree/mvc)
- ### [MVP](https://github.com/marty-suzuki/iOSDesignPatternSamples/tree/mvp)
- ### [MVVM](https://github.com/marty-suzuki/iOSDesignPatternSamples/tree/mvvm)
- ### [Flux](https://github.com/marty-suzuki/iOSDesignPatternSamples/tree/flux)## Difference between A to B
|A / B|MVC|MVP|MVVM|Flux|
|:-:|:-:|:-:|:-:|:-:|
|MVC|-|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/1/files)|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/2/files)|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/3/files)|
|MVP|-|-|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/4/files)|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/5/files)|
|MVVM|-|-|-|[diff](https://github.com/marty-suzuki/iOSDesignPatternSamples/pull/6/files)|You can compare differences like this.
![](./Images/diff.png)
## Run
You need to set `Github Personal Access Token` like this.
```swift
extension ApiSession {
static let shared: ApiSession = {
let token = "" // <- Your Github Personal Access Token
return ApiSession(injectToken: { InjectableToken(token: token) })
}()
}
```## Requirements
- Xcode 12 or later
- iOS 13 or later
- Swift 5 or later## Special Thanks
- [GithubKitForSample](https://github.com/marty-suzuki/GithubKitForSample)
## Author
marty-suzuki, [email protected]
## License
iOSDesignPatternSamples is available under the MIT license. See the LICENSE file for more info.