【SPS2010】Client Object Model

Client Object Model 是SharePoint 2010中新加的一个非常酷的功能。开发者可以从NET客户端上运行的应用程序访问SharePoint 2010,从而大大扩展了sharepoint应用。再也不必‘自古华山一条路’用web-service。

无需编写或安装SharePoint服务器上的代码。Client Object Model使我们能够建立集成的应用程序与SharePoint2010保持区隔,

Client Object Model和Object Model极为相似。

 

Client

Server

Microsoft.SharePoint.Client.ClientContext

Microsoft.SharePoint.SPContext

Microsoft.SharePoint.Client.Site

Microsoft.SharePoint.SPSite

Microsoft.SharePoint.Client.Web

Microsoft.SharePoint.SPWeb

Microsoft.SharePoint.Client.List

Microsoft.SharePoint.SPList

Microsoft.SharePoint.Client.ListItem

Microsoft.SharePoint.SPListItem

Microsoft.SharePoint.Client.Field

Microsoft.SharePoint.SPField

 

在客户端运行需要2个DLL.可以从sharepoint 2010服务器上取得

Microsoft.SharePoint.Client.dll 

Microsoft.SharePoint.Client.Runtime.dll

位置:%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI

 

代码

Dim clientContext AS ClientContext  = new ClientContext(siteUrl)

Dim siteCollection AS Site = clientContext.Site

Dim site AS Web  = clientContext.Web

 

其他的和使用Object Model没有差别。

 

 

你可能感兴趣的:(object)