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

Data Layer with Android Dependencies #12

Closed
anotherhale opened this issue Apr 3, 2015 · 1 comment
Closed

Data Layer with Android Dependencies #12

anotherhale opened this issue Apr 3, 2015 · 1 comment

Comments

@anotherhale
Copy link

I have only skimmed through the source code, but I noticed that the UserDataStoreFactory and the RestApiImpl have a dependency on Android libraries. This appears to break the rule for the Clean Architecture Dependency Rule: "source code dependencies can only point inwards and nothing in an inner circle can know anything at all about something in an outer circle."

Is the Android Context used for the UserDataStoreFactory and could it be removed?

Is it possible to check connectivity from RestApi without dependency on Android libraries?

I am trying to find an architecture that I can write my core library that would interface with both mobile and web apps. I like the concepts of the Clean Architecture for this.

@anotherhale anotherhale changed the title Data Layer with Android Dependency Data Layer with Android Dependencies Apr 3, 2015
@android10
Copy link
Owner

The fact that data layer has dependencies with the android framework does not mean the rule is broken. Actually you need them otherwise I would not be able to fulfill the needs of that module.

In other words I would break that rule if I had my data layer depending on the presentation layer for example and not the other way around.
Here is the article where I explain those concepts:
http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/

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