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

Module dependencies questions #159

Closed
nkleban opened this issue Jun 20, 2016 · 2 comments
Closed

Module dependencies questions #159

nkleban opened this issue Jun 20, 2016 · 2 comments

Comments

@nkleban
Copy link

nkleban commented Jun 20, 2016

Why data module has domain module in dependencies list? Why in domain layer there is no dependency on data module? Why presentation layer has dependency on both domain and data layer?

"Data module"
dependencies { compile project(':domain') }

"Presentation module"
dependencies { compile project(':data') compile project(':domain') }

Shouldn't it be like a straight line?
"Presentation" depends on -> "Domain" depends on -> "Data"

@CROSP
Copy link

CROSP commented Jun 21, 2016

@nkleban I was confused with this at first. But you what you described is n-tier architecture, common approach used for ages. But in case of Clean Architecture more likely Onion Architecture is used.
This means that DomainLayer which is all business rules, core, kernel or whatever of your app, which should stay independent and operate only with interfaces.
In case of this example all data flow is implemented with RxJava
By the way, to make it more clear Presentation and Data layer can be on the same layer, because it is outer ring, above Domain.
This is how I understand this architecture. If I am wrong please let me know. @Trikke has great understanding of this architecture, so you can read my similar question #150

@nkleban
Copy link
Author

nkleban commented Jun 22, 2016

@CROSP thank you for your explanation! I was confused by diagram where outer ring consists of only UI.

@nkleban nkleban closed this as completed Jun 22, 2016
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