Data transfer object
Data transfer object (DTO) is a design pattern used to transfer data between software application subsystems. DTOs are often used in conjunction with data access objects to retrieve data from a database.
The difference between data transfer objects and business objects or data access objects is that a DTO does not have any behavior except for storage and retrieval of its own data (accessors and mutators). DTOs are simple objects that should not contain any business logic that would require testing.
In a traditional EJB (Enterprise JavaBeans) architecture, DTOs serve dual purposes: first, they work around the problem that entity beans pre-ejb 3.0 are not serializable; second, they implicitly define an assembly phase where all data to be used by the view are fetched and marshalled into the DTOs before returning control to the presentation tier. A third reason of using DTOs could be that certain layers of the application should not be able to access the underlying data access objects, and hence change the data.
See also 
Note: A Value object is not a DTO. The two terms have been conflated by Java developers in the past.
- MSDN (2010). Data Transfer Object. Microsoft MSDN Library. Retrieved from http://msdn.microsoft.com/en-us/library/ms978717.aspx.
- Fowler, Martin (2010). Data Transfer Object. Patterns of Enterprise Application Architecture. Retrieved from http://martinfowler.com/eaaCatalog/dataTransferObject.html.
- Data Transfer Object - Microsoft MSDN Library
- jDTO Binder - an open source Java DTO/OOM Framework
- GeDA - generic dto assembler is an open source Java framework for enterprise level solutions
|This computer programming-related article is a stub. You can help Wikipedia by expanding it.|