What is Data Transfer Object?

前端 未结 8 1205
庸人自扰
庸人自扰 2020-11-22 10:35

What is a Data Transfer Object?

In MVC are the model classes DTO, and if not what are the differences and do we need both?

8条回答
  •  我在风中等你
    2020-11-22 10:44

    With MVC data transfer objects are often used to map domain models to simpler objects that will ultimately get displayed by the view.

    From Wikipedia:

    Data transfer object (DTO), formerly known as value objects or VO, is a design pattern used to transfer data between software application subsystems. DTOs are often used in conjunction with data access objects to retrieve data from a database.

提交回复
热议问题