What is the difference between SharePoint 2010 and 2013 Client object model
In SharePoint 2010.
Client.svc can access from below ways...
-Managed Code(.Net library)- Using Microsoft.sharepoint.client.dll
-SilverLight- Using Microsoft.sharepoint.client.silverlight.dll
-Javascript- SP.js
Here we can access Client.SVC using client (.net or Silver-light or JavaScript). We can't access directly Client.svc
-Managed Code(.Net library)- Using Microsoft.sharepoint.client.dll
-SilverLight- Using Microsoft.sharepoint.client.silverlight.dll
-Javascript- SP.js
Here we can access Client.SVC using client (.net or Silver-light or JavaScript). We can't access directly Client.svc
it will return JSON.
- CSOM was made available through WCF entry point – _vti_bin/client.svc
- SharePoint 2010 doesn’t support direct access to the client.svc
- Three programming model – .NET CSOM, Silverlight CSOM, and JavaScript CSOM
- Calls to the client.svc must go through supported proxy entry points & assemblies e.g. SP.JS for JavaScript CSOM and runtime DLLs in .NET CSOM and Silverlight CSOM, Proxy will forward request to the client.svc in XML format
- Client.svc sends JSON response/results back to the client which would be formatted into user friendly formatted JavaScript or .NET objects for users to consume
- Managed CSOM easier to use than from JavaScript
- JavaScript driven CSOM hard to use and more limited – no compile time checking or IntelliSense
In SharePoint 2013
Client.svc is extended with REST capabilities. Still we can access using .net, SilverLight and Javascript.
-So client.svc support direct access from REST clients
-client.svc accepts HTTP GET, PUT, POST requests.
-So client.svc support direct access from REST clients
-client.svc accepts HTTP GET, PUT, POST requests.
This is the main difference, using REST we can access SharePoint in any technology and any device.
using oData protocol, REST will work.
REST: SharePoint returns REST based data in two formats – ATOM XML and JSON
- CSOM changes in SharePoint 2013
- Four programming model – .NET CSOM, Silverlight CSOM, JavaScript CSOM, and REST CSOM
- Most significant improvement in CSOM is client.svc service extended with REST capabilities
- client.svc now supports direct access from REST clients
- client.svc accepts HTTP GET, PUT, POST requests
- Implemented in accordance with OData protocol
- Evens the field with Non .NET developers to access SharePoint data – Can be called from Non .NET clients through REST based APIs
- CSOM extended new APIs
- New APIs for SharePoint Server functionality
- New API for Windows Phone Applications
- New CSOM entry point is available in _api, this is mapped to the entry point of client.svc, No need to directly access _api from the .NET CSOM, JavaScript CSOM, or Silverlight CSOM, Just use same proxy & entry points as SP2010 – Runtime DLLs & SP.JS
- New APIs with SharePoint Server functionality – They are all available in Sever Side .NET CSOM and REST based APIs
- User Profiles (no need to use User Profiles ASMX for remote calls)
- Search (no need to use Search.ASMX for remote calls)
- Taxonomy
- Feeds
- Publishing
- Sharing
- Workflow
- E-Discovery
- IRM
- Analytics
- BCS
- What about ListData.svc?
- ListData.svc carried over from SharePoint 2010
- Use REST CSOM when writing JavaScript
- ListData.svc still available for backward compatibility – for migrated client applications.
- ListData.svc carried over from SharePoint 2010