查询列表项和使用 SharePoint Web 服务与对象模型 [英] Querying list items and using SharePoint web services vs the object model

查看:30
本文介绍了查询列表项和使用 SharePoint Web 服务与对象模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司正在考虑编写一个自定义应用程序,该应用程序需要跨多个网站集执行多个列表项查询.它将需要为 WSS 3.0 运行,如果它也适用于 WSS 2.0,它会很好".它不是为 MOSS/SPS 设计的,但如果它在这些平台上工作,它再次会很好".对于解决方案应使用哪个 .NET 版本没有限制.

My company is looking into writing a custom application that will need to perform many list item queries across multiple site collections. It will need to run for WSS 3.0 and it 'would be nice' if it worked on WSS 2.0 as well. It won't be designed for MOSS/SPS but again it 'would be nice' if it worked on these platforms. There is no restriction on which .NET version should be used for the solution.

对于这种类型的应用程序,哪个更好:对象模型/API 或 SharePoint Web 服务?我考虑的主要因素是性能,其次是特性和功能.谢谢!

For this type of application, what would be better: the object model/API or SharePoint web services? The primary factor I'm considering is performance, followed by features and functionality. Thanks!

推荐答案

对象模型更好,因为您可以访问其他功能和列表项的完整详细信息,例如版本历史记录.

Object model is better as you can gain access to additional features and the full detail of the list items, such as the version history.

对象模型的性能也更好(只要您正确处置()您的 spsite 和 spweb 对象).

The object model is also better for performance (as long as you dispose() your spsite and spweb objects properly).

Sharepoint 对象模型在 2 和 3 之间存在一些差异,但是如果您查看 v2 的参考,那么它也可以完全用于 v3.

The Sharepoint object model has some differences between 2 and 3, but if you look at the reference for v2 then it will also work fully with v3.

Web 服务在 v2 和 v3 之间根本没有变化,这解释了为什么它们没有 v3 的任何新功能.

The web services have not changed at all between v2 and v3, which explains why they do not have any new features of v3.

对象模型在性能上获胜的原因是您不会将数据序列化为 Xml,然后传输一大块 Xml,然后反序列化 Xml.对象模型可以节省您的内存和带宽.

The reason the object model will win on performance is that you will not be serialising the data as Xml and then transmitting a large chunk of Xml, and then deserialising the Xml. The object model spares your memory and bandwidth.

这篇关于查询列表项和使用 SharePoint Web 服务与对象模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆