Introduction
In this article, we will explore different hosting types and technology abbreviations used in SharePoint 2010/2013 and elsewhere too. Useful API reference of the most frequently used types and objects implemented in the Server object model (SSOM) and at least one client programming model: .NET client-side object model (CSOM), JavaScript object model (JSOM), and/or REST. Here's the difference between CSOM/ JSOM/ SSOM/ REST.
Model Types
Model Types
- CSOM: CSOM, which stands for Client-Side Object Model, is a web services-based API of SharePoint. It allows access to SharePoint data and features from remote clients. CSOM was introduced in SharePoint 2010 and greatly enhanced in SharePoint 2013.
- JSOM: Access information in the host web using the Javascript Object Model, you need to use an SP.ClientContext.get_current() for normal use. New SP.ClientContext('url...') for specific SPSite. Note this works cross-SPSite in 2013.
- SSOM: Server Object Model is the most extensive API set available for SharePoint 2013. The core assembly is Microsoft.SharePoint.dll which is installed in the Global Assembly Cache. The Server Object Model will be executed in the server side & it provides a rich set of classes for representing & manipulating SharePoint objects. Must be deployed on same farm.
- REST: The REST Services in SharePoint offer nearly the same functionality like JSOM. Furthermore, it is easier to use for a developer not coming from the SharePoint world since REST interfaces are standardized. This makes the choice of technology easier than for JSOM.
Hosting
- SharePoint hosted: A SharePoint-hosted app may provision basic resources into its app web such as HTML/CSS/JS files, site column/content type/list definitions, etc. Under no circumstances can server-side code run within a SharePoint-hosted app.
- Provider-hosted: Provider-hosted apps for SharePoint include components that are deployed and hosted outside the SharePoint farm. They are installed on the host web, but their remote components are hosted on another server and 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 the Solution gallery. Support for a limited subset of the SSOM. No file access, so I can’t deploy anything to the _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 the host web.
- Farm solution: Full access, deploy through PowerShell.
Note. Microsoft officially announced the discontinuation of Autohosted apps model in SharePoint Online/Office 365 after it has been tested for the last few months.