android10 / android10/Android-CleanArchitecture
UseCase for each method of repository?
- Lingua principale
- Java
- Stelle
- 15.5k
- Fork
- 3.3k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Does we need to create _UseCases_ for each method from _Repository_ interface in domain layer?
For example assume that I have such _Repository_ interface
```
interface ThingRepository {
void create(Thing thing);
void delete(Thing thing);
List readAll();
int size();
}
```
As you can see there is `size()` method that returns number of records in database or in file, whatever. And this method is pretty fast.
I guess that there is no need for _UseCase_ for this method because it wouldn't block UI thread and can be executed synchronously.
So could you explain me when you create _UseCases_ and when you don't. Basically is there any rules for _UseCase_ creation?
Sorry if there is some misunderstanding in this issue.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
L'issue non indica alcun file né alcun test. Inizia esaminando le interfacce Repository e le classi UseCase del livello di dominio in questo progetto Android/Java, quindi documenta una regola specifica del progetto per stabilire quando un metodo di Repository riceve un UseCase; il lavoro è completo quando la regola è spiegata chiaramente con esempi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, java
- Ambito
- documentation, mobile
- Tipo di issue
- Documentazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 20/100