阅读背景:

DDD +节点。域逻辑应该去哪里

来源:互联网 

I am trying to institute DDD into a node.js application using es6. I am using mongoose for my data access layer. I noticed that mongoose has a ".methods" property tied to the model schema. In terms of adding business logic to an entity, would this be an ideal place to add business logic or should I consider creating another object that holds the business logic that mirrors the model schema object and just copy the data from one to the other? If I were using sequalize, what would be the preferred approach here?I am trying to institute DDD into a node.js app




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: