开发者

Where to put responsibility in Domain Model?

I am creating domain model. I have Goal ( something that user wants to achieve in his entire 开发者_如何学JAVAyear) concept/object and it has status that will vary over time. Now, User will update his status. Where should I put the responsibility of creating, updating and deleting the status.


You would be looking to use the Repository Pattern to keep the database responsibility out of your domain model. This is known as "Persistence Ignorance."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜