Knowledge (XXG)

Data transfer object

Source đź“ť

27:) is an object that carries data between processes. The motivation for its use is that communication between processes is usually done resorting to remote interfaces (e.g., web services), where each call is an expensive operation. Because the majority of the cost of each call is related to the round-trip time between the client and the server, one way of reducing the number of calls is to use an object (the DTO) that aggregates the data that would have been transferred by the several calls, but that is served by one call only. 843: 61:
is often incorrectly used outside of remote interfaces. This has triggered a response from its author where he reiterates that the whole purpose of DTOs is to shift data in expensive remote calls.
54:). In other words, DTOs are simple objects that should not contain any business logic but may contain serialization and deserialization mechanisms for transferring data over the wire. 903: 151: 884: 210: 918: 735: 913: 760: 533: 708: 332: 516: 426: 556: 526: 521: 38:
is that a DTO does not have any behavior except for storage, retrieval, serialization and deserialization of its own data (
908: 877: 203: 43: 801: 639: 416: 624: 619: 446: 870: 664: 629: 596: 246: 196: 461: 123:
Fowler, Martin (2010). Data Transfer Object. Patterns of Enterprise Application Architecture. Retrieved from
566: 538: 476: 441: 377: 219: 58: 543: 471: 421: 256: 822: 725: 571: 551: 496: 850: 634: 591: 576: 486: 77: 674: 659: 654: 511: 396: 342: 796: 775: 684: 581: 431: 324: 276: 238: 35: 466: 309: 299: 294: 266: 261: 854: 168: 124: 765: 506: 451: 372: 362: 352: 347: 179:
GeDA - generic dto assembler is an open source Java framework for enterprise level solutions
755: 701: 679: 456: 411: 382: 357: 337: 284: 251: 227: 31: 173: 104: 740: 601: 304: 289: 39: 897: 561: 406: 367: 314: 47: 73:
is not a DTO. The two terms have been conflated by Sun/Java community in the past.
817: 780: 669: 644: 436: 100: 70: 770: 745: 730: 649: 481: 842: 183: 137: 750: 188: 80:
pattern, the data transfer object can be referred to as the viewmodel.
51: 178: 192: 125:
http://martinfowler.com/eaaCatalog/dataTransferObject.html
858: 105:
https://msdn.microsoft.com/en-us/library/ms978717.aspx
810: 789: 718: 693: 610: 495: 395: 323: 275: 237: 226: 30:The difference between data transfer objects and 152:"Tutorial: Create a web API with ASP.NET Core" 878: 204: 174:Data Transfer Object - Microsoft MSDN Library 99:MSDN (2010). Data Transfer Object. Microsoft 8: 138:http://martinfowler.com/bliki/LocalDTO.html 885: 871: 234: 211: 197: 189: 904:Architectural pattern (computer science) 119: 117: 115: 113: 89: 95: 93: 7: 839: 837: 16:Programming object that carries data 857:. You can help Knowledge (XXG) by 150:Microsoft Learn (3 January 2024). 14: 841: 709:Enterprise Integration Patterns 19:In the field of programming a 1: 802:Portland Pattern Repository 935: 919:Computer programming stubs 836: 169:Summary from Fowler's book 136:LocalDTO. Retrieved from 914:Software design patterns 427:Event-based asynchronous 220:Software design patterns 103:Library. Retrieved from 333:Chain of responsibility 853:-related article is a 472:Scheduled-task pattern 422:Double-checked locking 823:Architectural pattern 726:Christopher Alexander 909:Concurrent computing 851:computer-programming 635:Dependency injection 592:Inversion of control 587:Data transfer object 487:Thread-local storage 78:model-view-viewmodel 21:data transfer object 640:Intercepting filter 36:data access objects 797:The Hillside Group 582:Data access object 432:Guarded suspension 417:Binding properties 866: 865: 831: 830: 625:Business delegate 557:Publish–subscribe 391: 390: 926: 887: 880: 873: 845: 838: 630:Composite entity 507:Front controller 247:Abstract factory 235: 213: 206: 199: 190: 156: 155: 147: 141: 134: 128: 121: 108: 97: 32:business objects 934: 933: 929: 928: 927: 925: 924: 923: 894: 893: 892: 891: 834: 832: 827: 806: 785: 776:Douglas Schmidt 756:Ward Cunningham 714: 702:Design Patterns 689: 680:Method chaining 612: 606: 567:Service locator 498: 491: 462:Read–write lock 398: 387: 378:Template method 319: 271: 229: 222: 217: 165: 160: 159: 149: 148: 144: 135: 131: 122: 111: 98: 91: 86: 67: 17: 12: 11: 5: 932: 930: 922: 921: 916: 911: 906: 896: 895: 890: 889: 882: 875: 867: 864: 863: 846: 829: 828: 826: 825: 820: 814: 812: 808: 807: 805: 804: 799: 793: 791: 787: 786: 784: 783: 778: 773: 768: 763: 758: 753: 748: 743: 741:John Vlissides 738: 733: 728: 722: 720: 716: 715: 713: 712: 705: 697: 695: 691: 690: 688: 687: 682: 677: 672: 667: 662: 657: 652: 647: 642: 637: 632: 627: 622: 616: 614: 608: 607: 605: 604: 599: 594: 589: 584: 579: 574: 569: 564: 559: 554: 549: 541: 536: 531: 530: 529: 524: 514: 509: 503: 501: 493: 492: 490: 489: 484: 479: 474: 469: 464: 459: 454: 449: 444: 439: 434: 429: 424: 419: 414: 409: 403: 401: 393: 392: 389: 388: 386: 385: 380: 375: 370: 365: 360: 355: 350: 345: 340: 335: 329: 327: 321: 320: 318: 317: 312: 307: 302: 297: 292: 287: 281: 279: 273: 272: 270: 269: 264: 259: 257:Factory method 254: 249: 243: 241: 232: 224: 223: 218: 216: 215: 208: 201: 193: 187: 186: 181: 176: 171: 164: 163:External links 161: 158: 157: 142: 129: 109: 88: 87: 85: 82: 66: 63: 15: 13: 10: 9: 6: 4: 3: 2: 931: 920: 917: 915: 912: 910: 907: 905: 902: 901: 899: 888: 883: 881: 876: 874: 869: 868: 862: 860: 856: 852: 847: 844: 840: 835: 824: 821: 819: 816: 815: 813: 809: 803: 800: 798: 795: 794: 792: 788: 782: 779: 777: 774: 772: 769: 767: 766:Robert Martin 764: 762: 761:Martin Fowler 759: 757: 754: 752: 749: 747: 744: 742: 739: 737: 736:Ralph Johnson 734: 732: 729: 727: 724: 723: 721: 717: 711: 710: 706: 704: 703: 699: 698: 696: 692: 686: 683: 681: 678: 676: 673: 671: 668: 666: 663: 661: 658: 656: 653: 651: 648: 646: 643: 641: 638: 636: 633: 631: 628: 626: 623: 621: 618: 617: 615: 609: 603: 600: 598: 595: 593: 590: 588: 585: 583: 580: 578: 575: 573: 572:Active record 570: 568: 565: 563: 562:Naked objects 560: 558: 555: 553: 552:Specification 550: 548: 546: 542: 540: 537: 535: 532: 528: 525: 523: 520: 519: 518: 515: 513: 510: 508: 505: 504: 502: 500: 497:Architectural 494: 488: 485: 483: 480: 478: 475: 473: 470: 468: 465: 463: 460: 458: 455: 453: 450: 448: 445: 443: 440: 438: 435: 433: 430: 428: 425: 423: 420: 418: 415: 413: 410: 408: 407:Active object 405: 404: 402: 400: 394: 384: 381: 379: 376: 374: 371: 369: 366: 364: 361: 359: 356: 354: 351: 349: 346: 344: 341: 339: 336: 334: 331: 330: 328: 326: 322: 316: 313: 311: 308: 306: 303: 301: 298: 296: 293: 291: 288: 286: 283: 282: 280: 278: 274: 268: 265: 263: 260: 258: 255: 253: 250: 248: 245: 244: 242: 240: 236: 233: 231: 225: 221: 214: 209: 207: 202: 200: 195: 194: 191: 185: 182: 180: 177: 175: 172: 170: 167: 166: 162: 153: 146: 143: 139: 133: 130: 126: 120: 118: 116: 114: 110: 106: 102: 96: 94: 90: 83: 81: 79: 74: 72: 64: 62: 60: 55: 53: 49: 45: 41: 37: 33: 28: 26: 22: 859:expanding it 848: 833: 818:Anti-pattern 781:Linda Rising 707: 700: 645:Lazy loading 586: 577:Identity map 544: 228:Gang of Four 145: 132: 75: 71:value object 68: 56: 29: 24: 20: 18: 790:Communities 771:Jim Coplien 746:Grady Booch 731:Erich Gamma 675:Type tunnel 660:Object pool 655:Null object 650:Mock object 512:Interceptor 482:Thread pool 397:Concurrency 343:Interpreter 65:Terminology 48:serializers 898:Categories 685:Delegation 620:Blackboard 325:Behavioral 277:Structural 239:Creational 84:References 751:Kent Beck 477:Semaphore 467:Scheduler 310:Flyweight 300:Decorator 295:Composite 267:Singleton 262:Prototype 184:Local DTO 44:accessors 811:See also 613:patterns 499:patterns 452:Proactor 399:patterns 373:Strategy 363:Observer 353:Mediator 348:Iterator 230:patterns 40:mutators 665:Servant 597:Model 2 457:Reactor 447:Monitor 412:Balking 383:Visitor 358:Memento 338:Command 285:Adapter 252:Builder 59:pattern 52:parsers 719:People 602:Broker 305:Facade 290:Bridge 849:This 694:Books 611:Other 547:-tier 368:State 315:Proxy 57:This 855:stub 670:Twin 527:MVVM 442:Lock 437:Join 101:MSDN 76:For 50:and 539:ECS 534:ADR 522:MVP 517:MVC 34:or 25:DTO 900:: 112:^ 92:^ 69:A 46:, 42:, 886:e 879:t 872:v 861:. 545:n 212:e 205:t 198:v 154:. 140:. 127:. 107:. 23:(

Index

business objects
data access objects
mutators
accessors
serializers
parsers
pattern
value object
model-view-viewmodel


MSDN
https://msdn.microsoft.com/en-us/library/ms978717.aspx




http://martinfowler.com/eaaCatalog/dataTransferObject.html
http://martinfowler.com/bliki/LocalDTO.html
"Tutorial: Create a web API with ASP.NET Core"
Summary from Fowler's book
Data Transfer Object - Microsoft MSDN Library
GeDA - generic dto assembler is an open source Java framework for enterprise level solutions
Local DTO
v
t
e
Software design patterns
Gang of Four
patterns

Creational

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑