Difference between Value Object pattern and Data Transfer pattern

后端 未结 8 923
别跟我提以往
别跟我提以往 2021-01-31 23:01

In which scenario can I use those design patterns in n-tier architecture?

8条回答
  •  心在旅途
    2021-01-31 23:57

    Data Transfer Object is used to set property values which is coming from database in Data Access Layer (DAO), whereas using VO pattern we can set values in controller layer of MVC that are already set in DAO Layer. Client can have access to VO objects rather than DTO's which he/she can iterate in jsp page. You can say there is a separation of concern for both layers.

提交回复
热议问题