sphinx-kotlin icon indicating copy to clipboard operation
sphinx-kotlin copied to clipboard

Transition to `UseCase` instead of `Repository`

Open 05nelsonm opened this issue 4 years ago • 0 comments

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.

05nelsonm avatar Jul 30 '21 13:07 05nelsonm