DTO is an acronym for Data Transfer Object, a design pattern used in data transfer.
DTO is an acronym for Data Transfer Object, a design pattern used in transferring data through internal or external interfaces. A DTO protects the application's internal data by acting as dummy storages, the whole logic is implemented only in actual Domain Objects (DO).
Pros:
- Fewer remote calls (typically one,
getDto()
vs. individualgetId()
,getName()
, etc.) - Improved data capsulation (Remote systems need only to know the details of the DTO, not DO internals)
Cons:
- class explosion
- conversions needed between DTOs and DOs