android10 / android10/Android-CleanArchitecture-Kotlin

Other options for entity mapping?

未關閉
#95 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Kotlin
星號
4.8k
分支
929
PR 合併指標
30 天內沒有已合併 PR

描述

In this sample there are at least three sets of **Entites**: Data layer entities (mapped to REST api or database: ```MoveEntity```), Domain layer entities (```Movie```) and view layer entites (```MovieView```). For each entity to flow from data layer to view layer two mappers are needed. Two other mappers are needed for reverse direction, which are not provided in this sample because only **read** scenarios are implemented. It means that four mappers are involved in moving data through layers back and forth. Adding a new field require all of them to change as well. This can become a maintenance problem. I have two questions regarding this issue:

1. Where is the best place to implement mapping logic?
2. What are other options? (maybe some kind of automatic mapping?)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。