Java EE 5 contains EJB 3 and JPA. With EJB /JPA new POJO Entities are available.
With such lightweight objects representing data in Java EE applications there is no need of cluttering application with Transfer Objects.
Sweeping statements like "JPA kills DTOs" and "EE5 dependency injection kills Service Locator" are nonsense. Yes, there are many situations where EE5 makes them redundant but at the same time many cases remain where these patterns are still valid.
You might not want to expose your entities directly; perhaps because they're too fine grained.
You want to avoid the anti-pattern of making everything an EJB, so you need to perform lookups in non container-managed objects.
SCJP, SCWCD, SCBCD, SCEA 5
posted 11 years ago
Piotr Uryga wrote:
Kengkaj Sathianpantarit wrote:Value Object is not the same as Transfer Object (TO or DTO pattern).
Value Object means objects that don't have identity. For example, services are Value Objects.
Value Object is an important building block for software design.
However, when I talk about Value Objects, I refer to Domain-Driven Design.
Are You serious man ?
They changed the name of pattern from Value Object (Ed1 of Core J2EE Pattern) to Transfer Object (Ed2).
You can find bunch of topics here on Javaranch about the whole case, f.e.: