z0rawar
09/02/2017, 3:42 AMMapper
classes to transform models at each layer. But IMO, if you have absolute control over your API and there are no differences between how you model your entities and how you present them, then you might get away with not having 3 data models.
The recommended approach is mostly ApiResponseObject --> PresentationLayerDO--> EntityDO
You can find a good working example in this repo here https://github.com/bufferapp/android-clean-architecture-boilerplate/blob/9a1308c42c0c882fc724a0e579ee1ce4d454f961/mobile-ui/src/main/java/org/buffer/android/boilerplate/ui/mapper/BufferooMapper.kt