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

[todo-mvp-clean] Applying Dependency rule #515

Open
mjohenneken opened this issue Mar 2, 2018 · 2 comments
Open

[todo-mvp-clean] Applying Dependency rule #515

mjohenneken opened this issue Mar 2, 2018 · 2 comments

Comments

@mjohenneken
Copy link

mjohenneken commented Mar 2, 2018

I noticed the sample is not following the dependency rule proposed by the linked article Clean Architecture.I.e. GetTasks uses the Task Repository, which belongs to the data package. I would argue it is a style common when writing a 3-layer architecture where the TaskRepository is used as a Port to access the data layer.

In clean architecture the depencendy rule would force us to have a interface inside the domain layer which is implemented by some class in the data layer. As it is very common to have some kind of persistence, we could say we break the rule for convinience? How do we apply the dependency rule to other cases where domain logic wants to talk to the outside world i.e. Messaging or Sharing information.

What do you think? How did you manage this in practice ?

@mjohenneken
Copy link
Author

mjohenneken commented Mar 15, 2018

I recommend reading this: android10/Android-CleanArchitecture#136

android10/Android-CleanArchitecture#273 is tackling the same problem.

@marcosalis
Copy link

I very much agree with your point @mjohenneken .
I've expanded the topic to more aspects of Clean and summed them up here if you're interested:
#695

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

2 participants