我应该在服务器或客户端上透视/交叉表数据库数据吗?
我有一个 Silverlight 3 应用程序,使用 WCF RIA 服务和实体框架作为数据层。
我需要旋转一些数据,并且想知道最佳实践是什么:服务应该返回旋转数据,还是应该只返回标准实体集并由客户端执行旋转?请记住,数据需要可编辑,因此我也需要能够“取消透视”数据。
谢谢。
I have a Silverlight 3 app using WCF RIA Services and Entity Framework for the data-layer.
I need to pivot some data and was wondering what the best practice is: Should the service return pivoted data, or should it just return a standard entity set and the client do the pivoting? Bearing in mind that the data needs to be editable so I need to be able to "un-pivot" the data as well.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您的用户主要是查看数据透视表数据并且很少进行编辑,那么发送数据透视表数据将会更快且响应更快。然而,如果他们总是编辑数据,那么两次访问服务器似乎没有什么意义。
If your users are primarily going to view the pivot data and rarely edit then sending the pivoted data will be quicker and more responsive. However, if they will always be editing the data, then there seems little point in making 2 trips to the server.