RIA Services DomainService 类位于第几层
我们正在构建一个新系统,该系统将具有多个前端,其中(至少)其中一个前端运行 Silverlight。
我们决定使用 RIA 服务作为 Silverlight 的服务外观。
问题是,我们应该在 RIA 服务域服务类“后面”维护另一个服务层,还是应该使用它作为我们的主要服务层?
考虑到我们还有其他前端不是在 Silverlight 中开发的,并且需要使用(大部分)相同的服务。
We're building a new system that will have more than one front-end, where (at least) one of them bing Silverlight.
We decided to use RIA Services as the Silverlight's service facade.
The question is, should we maintain another Service-Layer "behind" the RIA Services domainService classes or should we use it as our main Service-Layer?
Take in considerations that we have other front-ends not developed in Silverlight and will need to consume (for the most part) the same services.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议使用域服务作为服务层。由于您可以添加 OData 端点,因此任何客户端都可以使用它们公开的数据。
您还可以决定公开哪些实体,甚至可以定义具有比数据层中的实体更少或不同属性的新实体。
这是我们在一个项目(中型)中遵循的方法,效果非常好。
I would recommend using a domain service as a service layer. The data exposed by them can be consumed by any client since you can add OData endpoints.
You can also decide which entities to expose and even define new entities with less or different properties than the ones in your data layer.
This is the approach we're following in one of our projects (mid-sized) and it's been very good.