What is a DTO?

Source: Internet
Author: User

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.