Dto:data Transfer Object
Wikipedia defines:data transfer Object (DTO)[1][2] is a object that carries Data between processes. T He motivation for it use have to does with the fact, communication between processes is usually doing resorting to remote Interfaces (e.g. Web services), where each call was an expensive operation. [2] Because The majority of the cost of all call are related to the round-trip time between the client and the server, One of the reducing the number of calls is to use a object (the DTO) that aggregates the data that would has been trans Ferred by the several calls, and that's served by one call only. [2]
That is to say, DTOs are actually meant to reduce cost.
Differences from similar concepts: the difference between data transfer objects and business objects or data access objects are that a dtos does not h Ave any behavior except for storage and retrieval of its own data (accessors and mutators). DTOs is simple objects this should not contain any business logic that would require testing.
That is, DTOs do not contain any business logic other than getter and setter.
What is a DTO?