sphinx-kotlin
sphinx-kotlin copied to clipboard
Transition to `UseCase` instead of `Repository`
There's a lot of different repository interfaces that include methods not needed by some screens.
:sphinx:application:data:use-cases
|
|-- :use-case-message
| |-- UseCaseMessageGetAll
| |-- UseCaseMessageGetById
| `-- ... more UseCaseMessage interfaces
|-- :use-case-contact
| |-- UseCaseContactGetById
| |-- UseCaseContactUpdate
| |-- UseCaseContactGetAccountOwner
| `-- ... more UseCaseContact interfaces
|-- :... // more use-case modules
One UseCase per method for the SphinxRepository such that consuming screens only implement the method they need, nothing more. This will also allow for much easier refactoring, as the functionality for that UseCase will be extended to all consuming modules.