Skip to content

A reversi library and an app implemented in Swift applying the Clean Architecture

License

Notifications You must be signed in to change notification settings

koher/clean-reversi-swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CleanReversi

This is a reversi library and an app implemented in Swift applying the Clean Architecture.

This repository does not include the layer of Frameworks and Drivers. Check koher/clean-reversi-ios (iOS) and koher/clean-reversi-macos (macOS) for the implementations of the layer.

Also, CleanReversi simplifies some parts of the Clean Architecture. For example, some parts of Presenters and Controllers are implemented in the CleanReversiApp which mainly implements Use Cases because the cost to implement them in different modules is too much compared to the benefit.

Relations between the modules in this package and the layers in the Clean Architecture are shown below.

  • Enterprise Business Rules:
    • Entities: CleanReversi
  • Application Business Rules:
    • Use Cases: CleanReversiApp
  • Interface Adapters:
    • Presenters: CleanReversiApp
    • Controllers: CleanReversiApp
    • Gateways: CleanReversiGateway
  • Frameworks and Drivers: does not included in this repo

Though some layers are omitted, the Dependency Rule applies strictly. The dependencies between the modules are specified as below in Package.swift to conform to the requirements: "source code dependencies can only point inwards".

.target(
    name: "CleanReversi",
    dependencies: []),
...
.target(
    name: "CleanReversiApp",
    dependencies: ["CleanReversi", ...]),
.target(
    name: "CleanReversiGateway",
    dependencies: ["CleanReversiApp"]),

LICENSE

MIT License

About

A reversi library and an app implemented in Swift applying the Clean Architecture

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages