A **Data Transfer Object** (DTO) is a simple object that carries data between processes to reduce the number of method calls.
In distributed systems, every call over the network is expensive. Instead of asking for the name, then the email, and then the address separately, a DTO groups all that data into a single structure sent in one trip.
# Characteristics
-
data_object
No Logic
A DTO should not have business logic, only getters, setters, and simple properties.
-
swap_horiz
Serialization
They are easy to convert to formats like JSON or XML to be sent over HTTP.