Why does active record pattern not work with rich domain models?

后端 未结 2 1147
半阙折子戏
半阙折子戏 2021-02-08 05:31

I\'m reading the architectural patterns chapter of POEAA, and Fowler says that \"As the domain logic gets more complicated and you begin moving toward a rich Domain Model (116),

2条回答
  •  后悔当初
    2021-02-08 05:45

    No, I think he is talking about the domain logic. With active record the object carries both data and behavior. So that is a one-to-one match. If you start separating data/behaviour, like in the Data Mapper pattern, it becomes one-to-many. I have the impression that you sometimes really have to read that book like academic nonsense to understand what he means. :-)

提交回复
热议问题