Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Coupling in domain layer #12

Open
artjimlop opened this issue Aug 10, 2017 · 1 comment
Open

Coupling in domain layer #12

artjimlop opened this issue Aug 10, 2017 · 1 comment

Comments

@artjimlop
Copy link

I tested this template some weeks ago and I found the Interactor has a reference to the presenter. Conceptually, I find it wrong. The domain layer should be as decoupled as possible from the presentation and data layer.

The most common approach is making the presentation and domain layers communicate trough callbacks, so the interactor doesn't know to wich presenter is related.

Probably you already know this but just in case I tell you: think in the interactor like a lego piece. You should be able to change the piece you have over it (presenter in this case) without touching a single line.

@SergeyPetrachkov
Copy link

Interactor should communicate with presenter by Protocols.

Presenter should pass calls though InteractorInputProtocol and receive Interactor answers through InteractorOutputProtocol which the presenter should conform to.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants