Pergunta

I know they say that clean architecture are guidelines, and individual projects will affect implementation, but is there a general thought on the correct implementation? A lot of times I see DTO objects in the application layer, so do you just leave the proto models in the "API" layer and the application layer needs to know about them, or do you basically duplicate those models in both layers, and use translators in the "API" layer so that if the gRPC is ever changed the application doesn't need to?

Foi útil?

Solução

or do you basically duplicate those models in both layers

Yes.

and use translators in the "API" layer so that if the gRPC is ever changed the application doesn't need to?

Exactly.

Licenciado em: CC-BY-SA com atribuição
scroll top