-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 knows about Domain layer #150
Comments
The exact same question has already been answered here. |
@Trikke really thank you for your explanation. |
@andrewjohnson90 did not describe any model in that thread. He just literally asked the same question as you and had some confusions about the setup of the project vs the architectural ideas. |
@Trikke All in all, I think I got an idea, I was confused as well as a lot of user developers, because of
Am I right or I am still don't understand this approach ? Thanks. |
And just a side note, while nr 4 is possible, it would probably not be the best to follow this example repository if you would ever want to do that. This is because this is a minimal example, and the scope is just to create a correct Android App with Clean Architecture. |
@Trikke thank you a lot for you time and explanation, I think I got idea. I felt that app should be based on similar architecture some time ago when I didn't know about clean architecture, so I am so glad that there are a lot of people are interested in this. Please can leave any your contacts or sent me an email crospdevel@gmail.com |
@Trikke hi, couldn't find right issue to ask question about connection of Domain and Data. I have confusion about this case:
Similar question for cache manager. If i need to get something from cache or Api (which has logic), does that logic resides in UseCase ? Repository will only do CRUD for Api and DB |
Hi everyone. I wild about clean architecture, design patterns... I felt a long time ago that I need to design application in another way, found awesome article about Clean Architecture, but have just started to implement it.
I have one question about
Data
andDomain
layer.As I understand.
Use cases
. Use cases are verbs used in application likeGetUserWithAwesomeAvatarImage
or something else. This layer is responsible for creating specific request todata layer
, data layer support crud operations only, all application specific logic should be handled ondomain layer
There is also one important rule that
dependency arrow
should only point from upper layer to lower but not vice versa, but in example provided by author there dependency pointing fromData
toDomain
. Maybe I am wrong, but I thought that it should point fromDomain
layer toData
.For example create all repository stuff on
data layer
butdomain layer
will just consume repository fromdata layer
, for example using dependency injection.Please explain this.
The text was updated successfully, but these errors were encountered: