android10 / android10/Android-CleanArchitecture
Data layer knows about Domain layer
- Lingua principale
- Java
- Stelle
- 15.5k
- Fork
- 3.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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` and `Domain` layer.
As I understand.
1. Data layer is responsible for getting data from different places like file, db, cloud ...
2. Domain is responsible for `Use cases`. Use cases are verbs used in application like `GetUserWithAwesomeAvatarImage` or something else. This layer is responsible for creating specific request to `data layer`, data layer support crud operations only, all application specific logic should be handled on `domain 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 from `Data` to `Domain`. Maybe I am wrong, but I thought that it should point from `Domain` layer to `Data`.
For example create all repository stuff on `data layer` but `domain layer` will just consume repository from `data layer`, for example using dependency injection.
Please explain this.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Non viene indicato alcun file, test o punto di ingresso. Leggi prima i layer Data e Domain dell’esempio, quindi confronta la direzione delle loro dipendenze con la regola di Clean Architecture descritta nell’issue. Il lavoro è concluso quando viene documentata una spiegazione chiara di quale layer dovrebbe dipendere da quale altro e perché.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- mobile-dev
- Tipo di issue
- Documentazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100