Home

Buscar

Showing posts with label javascript. Show all posts
Showing posts with label javascript. Show all posts

Thursday, December 26, 2013

How the Client-Side Object Model Works


How the Client-Side Object Model Works
An application that uses SharePoint content interacts with the API in several ways—call methods and get the return values, pass a Collaborative Application Markup Language (CAML) query and get the results, and set or get properties. After you use the API to perform a specific task the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. 
The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or JavaScript objects for JavaScript). The following diagram shows these interactions.


It is important to be aware that you control when the SharePoint Foundation 2010 managed client object model starts to send the XML to the server and receives the JSON back from the server.

Namespaces in the JavaScript Object Model

==========================================================================
Namespace                                                                         JavaScript File
==========================================================================
CUI Namespace                                                                CUI.js, SP.UI.Rte.js
CUI.Controls Namespace                                              CUI.js
CUI.Page Namespace                                                     CUI.js, SP.UI.Rte.js
SP Namespace                                                                  SP.Core.js, SP.js, SP.Ribbon.js, SP.Runtime.js
SP.ListOperation Namespace                                       SP.Core.js
SP.Ribbon Namespace                                                  SP.Ribbon.js
SP.Ribbon.PageState Namespace                              SP.Ribbon.js
SP.UI Namespace                                                            SP.Core.js, SP.js, SP.UI.Dialog.js
SP.Utilities Namespace                                                  SP.Core.js, SP.js, SP.Exp.js
SP.WebParts Namespace                                              SP.js
SP.Workflow Namespace                                              SP.js
==========================================================================