What is Data Transfer Object?

前端 未结 8 982
庸人自扰
庸人自扰 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:50

    The definition for DTO can be found on Martin Fowler's site. DTOs are used to transfer parameters to methods and as return types. A lot of people use those in the UI, but others inflate domain objects from them.

提交回复
热议问题