Transcript

Client Object Model – SharePoint 2010

Shakir Majeed Khanhttp://junooni.wordpress.com/

MySelf

User Group Leader of SharePoint Techies, http://www.facebook.com/pages/SharePoint-TechiesWorking independently on SharePoint technologies. Trainer for  Microsoft Office SharePoint Server 2007 and  Window SharePoint Services 3.0 at AUC Technologies. 

AgendaThis Session is divided into two

Client Side Object ModelNET Client OM ECMAScript Client OMSilver Light API

Questions

Why Client Object Model?

More SharePoint Web services is a major requestClient Object Model provides complete API instead of more servicesProvides an abstraction layer to return results as recognizable SharePoint objectsConsistent developer experience across platforms (.NET, ECMAScript, Silverlight)

Equivalent ObjectsServer (Microsoft.SharePoint)

.NET Managed(Microsoft.SharePoint.Client)

Silverlight(Microsoft.SharePoint.Client.Silverlight)

ECMAScript(SP.js)

SPContext ClientContext ClientContext ClientContext

SPSite Site Site Site

SPWeb Web Web Web

SPList List List List

SPListItem ListItem ListItem ListItem

SPField Field Field Field

Using the Client Object Model

Client.svc

Server OM

Contentdatabase

ECMAScript OM

Proxy

Managed OM

Proxy

Managed Controls and Logic

ECMAScriptControls and Logic

XML Request

XML Request

JSON Response

JSON Response

Browser

Managed Client

SharePoint Server

Client Object Model

.NET Client Object Model

Demo

Client Object Model

ECMAScript Client Object Model

ECMAScript Client OM

ECMAScript Client OM is easily added to a SharePoint ASPX page - reference:

_layouts/sp.jsAdd this using <SharePoint:ScriptLink>

All libraries crunched for performanceUse un-crunched *.debug.js by adding <SharePoint:ScriptLink … ScriptMode=“Debug” />

Method signatures can be differentDifferent data value types

Demo

top related