Enterprise Java Development@TOPIC@

Chapter 34. Data Transfer Object (DTO) Pattern

Relating Business Objects to DTOs

34.1. Context
34.2. Problem
34.3. Forces
34.4. Solution
34.5. Consequences

Data Transfer Object
  • Represents a subset of the state of the application at a point in time

  • Not dependent on Business Objects or server-side technologies

    • Doing so would require sending Business Objects to client

  • XML and JSON provide the “ultimate isolation” in DTO implementation/isolation

Remote Facade
  • Uses Business Logic to perform core business logic

  • Layered on top of Business Logic to translate between Business Objects and DTOs

Business Logic
  • Continues to perform core duties as described in DAO Pattern

Business Object (Entity)
  • Continues to perform core duties as described in DAO Pattern

  • May have more server-side-specific logic when DTOs are present in the design