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

前端 未结 6 1712
野性不改
野性不改 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:23

    The answer is quite straight :

    • The domain objects have domain oriented design and methods.
    • The view objects have view/control oriented design and methods.

    If you can use your domain objects in the view, they are maybe not quite domain oriented.

提交回复
热议问题