Friday, April 26, 2013

What is Client Object Model in SharePoint 2010 ?

Client object model is newly introduced in SharePoint 2010 and it is a subset of Server Object model. As SharePoint’s object model is served based, many times developers want to write applications that need to talk to SharePoint from a client operating system and from client applications. Client object model brings a major portion of that rich server-side functionality as a Client-side API, which can be used in a .NET client such as a WPF application, in a Silverlight application, or in a simple client such as ECMAScript. As Silverlight runs on the client rather than running server - side, the client Object Model (COM) makes it easier for developers to build rich Silverlight applications on SharePoint. The addition of Silverlight integration to SharePoint, a client object model is critical because it makes it easier for developers to write applications against a full object model, rather than trying to call web services from within their client applications.

Note: This client.svc service is the entry point to the client object model. Also like server object model, the client object model code not necessary to resides on the server where SharePoint installed, it can be run on the client machine.

Architecture of client object model,


.NET Client Object Model
To develop a .Net Managed application, reference two DLLs:

• Microsoft.SharePoint.Client.dll
• Microsoft.SharePoint.Client.Runtime.dll

These files are usually installed into this directory:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI

Silverlight Client Object Model
To develop a Silverlight application, use the following two assemblies:

• Microsoft.SharePoint.Client.Silverlight.dll
• Microsoft.SharePoint.Client.Silverlight.Runtime.dll

These files are usually installed into this directory:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS\ClientBin

ECMAScript Client Object Model
The JavaScript client object model consists of several JS files that are all installed into the LAYOUTS folder under the path %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS:

•  SP.js/SP.debug.js
•  SP.Core.js/SP.Core.debug.js
•  SP.Runtime.js/SP.Runtime.debug.js
•  SP.Ribbon.js/SP.Ribbon.debug.js
•  JsGrid.js/JsGrid.debug.js
•  JSGrid.Gantt.js/JSGrid.Gantt.debug.js

No comments:

Post a Comment