Lilly
11/10/2020, 5:53 PMmy class
that provides the data. So far so good. Usually my class
would be a repository
but in my case the only data source of truth is a bluetooth device. I will definitely need a sort of abstraction between my bluetooth device and the use cases. So my question: How would you name this abstraction? Is it a Repository
, Facade
, Proxy
, Gateway
,Bridge
, Wrapper
, Mediator
.KamilH
11/10/2020, 6:15 PMSource
? It’s a common case to call your data sources like NetworkSource
, DatabaseSource
, FileSource
etc. Then if you need to apply some logic to your sources you can group them into Repository
Javier
11/10/2020, 6:48 PMBluetoothDatasource
Lilly
11/11/2020, 2:20 PMDataSource
object have? To be honest...when I would make it right, I would avoid a repository completely and put my abstraction logic into the appropriate UseCase
class. The abstraction I want to extract is just extended business logic. But the extraction to an extra layer (repository) allows the domain layer (I'm using a 3-tier module architecture) and so my use cases to be a pure kotlin library module without android framework dependencies. When I put the extended logic into an use case, I will have to depend on android framework. What do you think guys, what would you recommend? Would you still call it BluetoothDataSource
?Javier
11/11/2020, 2:24 PMDataSource
abstraction to transform models to domain, so later in the Repository
and/or UseCase
all datasources are using the same domain models, but I think it is not an universal rule.Lilly
11/11/2020, 4:05 PMJavier
11/11/2020, 4:28 PMLilly
11/11/2020, 5:03 PMUseCase
classes? According to the most common blog posts about Clean Architecture in Android the use cases are part of the domain layer and they represent the business logic and same layer defines a repository interfaface which the data layer has to implement.Javier
11/11/2020, 5:55 PM