Sequence of events:
Silverlight and .NET applications need reference to Microsoft.SharePoint.Client.dll and
Microsoft.SharePoint.Client.Runtime.dll to access the API. These two dlls can be downloaded from the
server where SharePoint 2010 is installed.
1. Once the client application uses Client OM, the calls are converted into XML request and sent to the
2. On the server, the XML request is handled by a service called Client.svc where it
translates the XML request into appropriate Object Model calls (SharePoint Server Object Model) and
gets the results.
(JSON) and sends back to the Client Managed Object Model.
4. On the client side, the JSON response is translated into Client OM objects.
if(window.confirm(‘Are you sure you want to delete this item?’))
objContext = new SP.ClientContext.get_current();
objWeb = objContext.get_web();
objList = objWeb.get_lists().getByTitle(“Product”);
objItem = objList.getItemById(strID);
this.DeleteItemSuccess), Function.createDelegate(this, this.DeleteItemFail));
function DeleteItemSuccess(sender, args)
window.location = “AllItems.aspx”;
function DeleteItemFail(sender, args)
alert(‘Item is not updated.’);
Synchronous Vs/ Asynchronous call:
While using SharePoint Client OM in .NET or Silverlight application, both ExecuteQuery() and
ExecuteQueryAsync() are available to developers.
ExecuteQuery() is a synchronous call, which means the
client application will wait for the server’s response before jumping onto next line of code.
ExecuteQueryAsync() is an asynchronous call, so code continues to execute; the client application
doesn’t wait for server’s response and will execute the next line of code.
Users can write .net, silverlight or ECMAScript in an ASPX page for
SharePoint 2010 sites and can manipulate the SharePoint content without the complexity of Server
Object model, or getting involved in the complexities of web services.