Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This thing doesn't have a "Data Layer". If you want rules for a "Data Layer" look at some other architecture. I know that Clean Architecture doesn't have Presentation-Domain-Data layering per-se but some people (whose ideas I happen to follow) usually described this: MVx = Presentation layer; UseCases/Entities = Domain layer; Repositories/Gateways/Interface-Adapters/Controllers/etc = Data layer. Like in these articles: fernandocejas.com/blog/engineering/… , proandroiddev.com/… Commented Sep 27, 2022 at 5:37
  • BTW, the question still stands. Let me rephrase: what if my View/ViewModel use the same object as the Interface-Adapter/Controller (ie.the CMSampleBuffer)? Do I have to map CMSampleBuffer to DTO (say, SampleBufferDTO)-> send it to the UseCase (eg. CheckForObjectDetectionUseCase.check(with dto: SampleBufferDTO) -> Observable<DetectedObjectEntity>) -> the UseCase then use the Interface-Adapter with the DTO (AppleMachineLearningAdapter.detectObject(_ dto: SampleBufferDTO) -> Observable<DetectedObjectEntity>) in which it will map the DTO back to CMSampleBuffer first before being used? Commented Sep 27, 2022 at 5:46