Where should I do the conversion: domain object & # 8596; DTO?

In a layer access layer or data access layer?

+3
source share
2 answers

The primary motivation for a DTO is to present an interface adapted to a different level (usually a presentation level). For example, on the data entry screen, some bits of data from the User object may be required in addition to some bits from the order, etc. In this case, the Domain for DTO should be executed at the level that invokes the presentation layer, i.e. Usually a “service” layer.

, Dozer, DTO.

- DTO, ( -) - , DTO ( ), ( -)

+5

DTO, , . . , DTO? - , , , , , , .

+2

Source: https://habr.com/ru/post/1736781/


All Articles