In Domain-Driven Design, can you use your domain entities in your UI?

前端 未结 6 1729
野性不改
野性不改 2021-02-20 00:03

In many leading DDD projects, especially MVC style, I see the UI using display objects that mirror domain entities, rather than using those domain objects directly. This style

6条回答
  •  花落未央
    2021-02-20 00:21

    Within an MVC design you would typically have a mapping from Repository -> Domain Models and then from Domain Models -> View Models. The View Models often contain Domain Objects though.

提交回复
热议问题