Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency Rule: UseCase depends on the ViewModel #7

Open
darwingr opened this issue Nov 19, 2020 · 0 comments
Open

Dependency Rule: UseCase depends on the ViewModel #7

darwingr opened this issue Nov 19, 2020 · 0 comments

Comments

@darwingr
Copy link

darwingr commented Nov 19, 2020

The OutputBoundaries depend on their respective ViewModels.
As a result the UseCase component will also depend on the ViewModel, though it doesn't really need to.

What are some acceptable remedies here?
So far I see:

  1. Change the return type of OutputBoundary#getViewModel() to the generic Object, use unit tests on the Presenter to satisfy doubts.
  2. Add an empty ViewModelInterface for each UseCase component to be depended on by the OutputBoundary, UseCaseInteractor and the Controller while the Presenter uses the implementation directly.
  3. Make a single empty ViewModel interface (set as immutable/sealed if possible) to be referred to in all the UseCase component. All ViewModels implement that interface and the rest is as above in # 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant