Search This Blog

Sunday, November 9, 2014

CSOM vs JSOM vs SSOM vs REST

2013

Model Types:
  • CSOM: Client-side object model. C# (or Visual Basiconly, use NuGet, at the moment same package for both 2010 and 2013.
  • JSOM: JavaScript object model. JavaScript only.
    • SP.ClientContext.get_current() for normal use. new SP.ClientContext('url...') for specificSPSite. Note this works cross-SPSite in 2013.
  • SSOM: Server-side object model. C# (or Visual Basiconly, use Microsoft.SharePoint (15) DLL. Must be deployed on same farm.
  • REST: REST web technologies and standard Open Data Protocol (OData) syntax.
Hosting:
  • SharePoint hostedJavaScript and templates only. By templates I mean list templates, content types, etc. Anything that can be uploaded to the SharePoint virtual file system can also be added, such as .aspx-pages.
  • AutohostedC# (or Visual Basic) only. Currently only supported on Office 365. On app purchase an Azure instance will be automatically provisioned. Uses OAuth to comunicate to SharePoint site.
  • Provider hostedC# (or Visual Basic). Similar to Autohosted, but is meant to be hosted more manually (i.e. On Azure). So you fire up a web application, on any server, and then use S2S to connect to SharePoint.
  • Sandboxed: Remnant from 2010, can be uploaded to Solution gallery. Support for limited subset of the SSOM. No file access, so can not deploy anything to _layouts folder. If you use the limited SSOM-part (C#) your solution will be considered deprecated. Support for templates such as list templates and content types, deployed directly to host web.
  • Farm solution: Full access, deploy through PowerShell.
Technologies table:
+--------------------------------------------------------+
¦               ¦ CSOM ¦ JSOM ¦ SSOM ¦ REST JS ¦ REST C# ¦
¦---------------+------+------+------+---------+---------¦
¦ JavaScript    ¦      ¦  x   ¦      ¦  x      ¦         ¦  
¦ C#            ¦      ¦      ¦  x   ¦         ¦  x      ¦  
¦ From browser  ¦      ¦  x   ¦      ¦  x      ¦         ¦  
¦ From server   ¦  x   ¦      ¦  x   ¦         ¦  x      ¦  
¦ OAuth2        ¦  x   ¦  x   ¦  x   ¦  x      ¦  x      ¦  
¦ S2S           ¦  x   ¦      ¦  x   ¦         ¦         ¦ 
+--------------------------------------------------------+
Hosting table:
+---------------------------------------------------------------------+
¦                     ¦ CSOM ¦ JSOM ¦ SSOM        ¦ REST JS ¦ REST C# ¦
¦---------------------+------+------+-------------+---------+---------¦
¦ SharePoint hosted   ¦      ¦  x   ¦             ¦         ¦         ¦
¦ Autohosted          ¦  x   ¦      ¦             ¦         ¦  x      ¦ 
¦ Provider hosted     ¦  x   ¦      ¦             ¦         ¦         ¦ 
¦ Sandboxed solution  ¦  x   ¦  x   ¦  x(limited) ¦  x      ¦  x      ¦
¦ Farm solution       ¦  x   ¦  x   ¦  x          ¦  x      ¦  x      ¦ 
+---------------------------------------------------------------------+

2010

Model Types:
  • CSOM: Client-side object model. C# (or Visual BasicNuGet and JavaScript.
    • SP.ClientContext.get_current() for normal use. new SP.ClientContext('url...') for specificSPWeb.
  • SSOM: Server-side object model. C# (or Visual Basiconly, use Microsoft.SharePoint (14) DLL. Must be deployed on same farm.
  • REST: REST in 2010 is only for ListData.svc. Note that SPServices (jQuery plugin) utilizes the.asmx services in _/vti/bin , such as /_vti_bin/Webs.asmx
Technologies table:
+-------------------------------------+
¦               ¦ CSOM ¦ SSOM ¦ REST  ¦
¦---------------+------+------+-------¦
¦ JavaScript    ¦  x   ¦      ¦  x    ¦  
¦ C#            ¦  x   ¦  x   ¦  x    ¦  
¦ From browser  ¦      ¦  x   ¦  x    ¦  
¦ From server   ¦  x   ¦  x   ¦       ¦  
+-------------------------------------+
Hosting table:
+---------------------------------------------------------------------+
¦                     ¦ CSOM ¦ JSOM ¦ SSOM        ¦ REST JS ¦ REST C# ¦
¦---------------------+------+------+-------------+---------+---------¦
¦ Sandboxed solution  ¦  x   ¦  x   ¦  x(limited) ¦  x      ¦  x      ¦
¦ Farm solution       ¦  x   ¦  x   ¦  x          ¦  x      ¦  x      ¦ 
+---------------------------------------------------------------------+

No comments:

Post a Comment