Question

I am new to SharePoint, and confused about all of these terminologies, what are the differences between these 3? when do we use each one?

Was it helpful?

Solution

Both CSOM and REST are based on the same web service Client.svc in SharePoint 2013.

CSOM

The following list provides guidance on when to use CSOM endpoints:

  • Create a .NET application that performs CRUD operations on SharePoint data
  • Create an HTML/JavaScript application that performs CRUD operations on SharePoint data
  • Create an app for Office that works with SharePoint
  • Create an ASP.NET web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type

REST/OData endpoints

OData defines an abstract data model and a protocol that let any client access information exposed by SharePoint. The OData protocol is based on REST which define how HTTP verbs are used.

SharePoint REST service architecture enter image description here

The following list provides guidance on when to use REST/OData endpoints:

  • Create an iOS or Android app that performs CRUD operations on SharePoint data
  • Create a LAMP web application that performs CRUD operations on SharePoint data or external data that is surfaced in SharePoint by a BCS external content type

References

OTHER TIPS

You will find many references for the basic definitions of REST and OData. This link provides a good overview.

Now in a SharePoint Context:

SharePoint has a service exposed called client.svc which is the endpoint for all client related operations.

The SharePoint 2013 REST API (_api) is a REST API which has operations exposed which can read and modify SharePoint data. You can call this like any other REST API e.g. through the jQuery.ajax function.

The Client Object Model is also a wrapper which internally calls client.svc. The difference here is that it provides a set of typed classes to work with.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top