티스토리 뷰

DTO : Data Transfer Object

VO : Value Object

 

주된 차이점은 두 가지 객체의 사용처에 있다고 보임.

Tier/Layer간 다수의 호출을 한다고 했을 때 발생하는 비용을 최소화 하기 위한 전략으로 DTO를 사용.

DTO1={VO1의 전체 혹은 일부, VO2의 전체 혹은 일부} 

 

그 외에 차이점은 value validation에 대한 가능성 및 엄격성 측면에서 VO는 충족해야 하고 DTO는 최소 gettter/setter 정도만으로 구성함. 즉, VO는 도메인 내에서 불변성의 값에 대해 중점을 두는 반변  DTO는 전송과 합성(구성)에 초점을 두고 있다고 봄(DTO도 setter를 제거하고 생성자, 빌더를 구성하여 불변성을 유지하기도 함)

 

Data transfer object(wiki)

 

Value Object vs. Data Transfer Object (VO vs. DTO)

A Data Transfer Object (DTO) is just as stupid data container which is used to transport data between layers and tiers

...

See also: How Evil Are Actually DTOs?

 

Is it a DTO or a Value Object?

 

Is it a DTO or a Value Object? — Matthias Noback - Blog

A common misunderstanding in my workshops (well, whose fault is it then? ;)), is about the distinction between a DTO and a value object. And so I've been looking for a way to categorize these objects without mistake. What's a DTO and how do you recognize i

matthiasnoback.nl

 

Data Transfer Object(martinfowler)
 

P of EAA: Data Transfer Object

| P of EAA Catalog | Data Transfer Object An object that carries data between processes in order to reduce the number of method calls. For a full description see P of EAA page 401 When you're working with a remote interface, such as Remote Facade (388), ea

martinfowler.com

 

 

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함