javaejbdtoanti-patternsdata-transfer-objects

Why are data transfer objects (DTOs) an anti-pattern?


I've recently overheard people saying that data transfer objects (DTOs) are an anti-pattern.

Why? What are the alternatives?


Solution

  • Some projects have all data twice. Once as domain objects, and once as data transfer objects.

    This duplication has a huge cost, so the architecture needs to get a huge benefit from this separation to be worth it.