Friday, December 16, 2011

Communicate with SharePoint: {Client, Server, Web Service} Model

  • Client Object Model
The Client Object Model allows developers to extend the feature of Server Object Model on a box where SharePoint is not running. It could be a console application, desktop application, web application etc.
  • Server Object Model
The Server Object Model allows you to leverage the features of highly structured server-side model. You can drill down from higher level object SPFarm to bottom level SPList to SPField etc. 
  • Web Services
    • Rest
The new REST (Representational State Transfer) allows to perform standard operation  GET, POST, PUT, and DELETE HTTP verbs directly from your browser. RESTful call enable you to filter, sort and select information from SharePoint Lists and Library. A Response from SharePoint server could be  JavaScript Object Notation (JSON), Xml, Atom feed, AtomPub etc.
An example RESTful call -
http://myserver/_vti_bin/listdata.svc/Employees?$filter=Project/Title eq 'My Project Title'
    • Soap
The Soap (Simple Object Access Protocol) provides numerous method to communicate or work with SharePoint contents closely. AJAX and JQuery utilizes SharePoint Soap Web Service.
    A list of Soap method can be viewed at -
    http://myserver/_vti_bin/<Web Services Name>.asmx


    1. This comment has been removed by the author.

    2. Update : Client Object Model
      You can only leverage features of Client Object Model when your application is under .NET framework.
      You can not add .dll outside .NET.

    3. For application outside .NET, Restful calls to SharePoint would be great.