Tuesday, March 15, 2011

SharePoint Client Object Model vs Server Object Model Classes

One of the new feature of SharePoint 2010 is the Client Object Model. By using Client Object Model, developers can build the applications which can talk to SharePoint without using WebServices and without deploying any server side code.

Following is the list of Client Object Model classes and their equivalent to Server Object Model classes:

Client Object ModelServer Object Model
ClientContextSPContext
SiteSPSite
WebSPWeb
ListSPList
ListItemSPListItem
FieldSPField


Example:
using Microsoft.SharePoint.Client;

private void SomeMethod()
{
  ClientContext clientContext = new ClientContext(siteUrl);
  Site siteCollection = clientContext.Site;
  Web site = clientContext.Web;
}

Ref: http://msdn.microsoft.com/en-us/library/ee857094(office.14).aspx

Knowledge Chat Bot (No Code)

Recently my customers was looking for a solution where on-field guys can search for answers related to their tasks and it was a perfect scen...