RIA Silverlight 项目中域服务类的最佳实践
我想问一下,在单个域服务类中保存业务对象的 CRUD 操作是否是一个好的做法。我们是否应该为每个 BO 提供一个域服务类?
产品域服务.cs 客户域服务.cs ...
或单个
BusinessObjectDomainService.cs
I would like to ask whether or not is a good practice, to hold the CRUD operations for business objects, in a single domain service class. Should we provide a domain service class for each BO?
ProductDomainService.cs
CustomerDomainService.cs
...
or a single
BusinessObjectDomainService.cs
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我选择了单个域对象,因为我的模型并不那么复杂。我认为将域服务聚集在一起可能会更好,即用户服务日志服务。对于每个业务对象,这种逻辑聚集比 1 更好。
I went with a single domain object beause my model is not that complex. I would think it might be better to cluster the domain services together ie user services logging services. That kind of logical clumping would be better than 1 for each business object.