DDD “View Objects”?

后端 未结 4 701
情歌与酒
情歌与酒 2021-02-14 18:01

Given an application that involves, say, Companies, I might have a Company class. I will have a data access layer that populates a List . However, there will be

4条回答
  •  鱼传尺愫
    2021-02-14 18:35

    That sounds like a reasonable approach to me.

    Later on, if the customer comes to you asking for your SearchResult to display something unrelated to the Company model - something crazy like the number of nearby ice cream shops you'll have a much easier time appending this to your CompanySearchResult than your domain object.

提交回复
热议问题