by1455的自留地

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

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没有差别。

 

 

posted on 2010-01-07 11:17  by1455  阅读(618)  评论(0编辑  收藏  举报