Show Menu
Cheatography

Data Patterns Cheat Sheet (DRAFT) by

DTO, DAO

This is a draft cheat sheet. It is a work in progress and is not finished yet.

DAO - Data Access Object

Defini­tion: An object that provides an abstract interface to some type of database or persis­tence mechanism
Benefits: Provide some specific data operations without exposing details of the database
 

DTO - Data Transfer Object

Defini­tion: An object that carries data between processes
Usage: To define the data contract in web service or remote data transfer
Benefits: Eliminate redundant data from the data contract; Aggregate data to transfer in one remote operation
Compar­ison: Unlike DAO, DTO does not have any behavior (except for getters and setters.) DTOs are simple objects and do not require testing; A value object is not a DTO
Usability level: Simple (does not require complex design or archit­ecture)