android10 / android10/Android-CleanArchitecture-Kotlin

Other options for entity mapping?

Aberta
#95 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Kotlin
Estrelas
4.8k
Forks
929
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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?)

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.