Is using data transfer objects in ejb3 considered best practice

后端 未结 6 631
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-07 22:01

Although obviously not all scenarios can be covered by a single design, is it generally felt now that ORM classes should be passed to and fro between the presentation and busine

6条回答
  •  没有蜡笔的小新
    2021-02-07 22:37

    I think DTOs existence is related to JPA/Hibernate flaws. If you could always do transparently lazy initialization you will never use them. So using DTOs is a contract where my domain/workspace always lose (duplication everywhere). Summing up, you can use them but you have to hate them :)

提交回复
热议问题