Skip to content

powerwolf543/Swift-MVP-Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swift

Swift-MVP-Sample

It's an iOS simple project that how I implement MVP (Model-View-Presenter) and Clean Architecture in Swift.

Requirements

  • Xcode 10.2+
  • Swift 5.0+

Architecture

View Layer (MVP)

  • View - Displays information from the Presenter and sends user interactions back to the Presenter.
  • Presenter - Contains the presentation logic and tells the View what to present
  • ViewBuilder - The Builder’s responsibility is to instantiate a specific View and injects the dependency for all components.
  • Router - Handles navigation logic for which screen should appear and when.

Domain Layer

  • UseCase - Contains the business logic for a specific use case in the project. They are view agnostic and can be consumed by one or many Presenters.
  • Model - Simple data model objects.

Data Layer

  • Repository - Query objects from different data sources (Core Data, Realm, web server, etc.) with a only single-entry point.

References

Author

Nixon Shih, powerwolf543@gmail.com

License

Swift-MVP-Sample is available under the MIT license. See the LICENSE file for more info.

About

It's an iOS simple project that how I implement MVP (Model-View-Presenter) and Clean Architecture in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Languages