Development models

Summary

Developing solutions for Microsoft SharePoint Online and/or on-premises can rely on multiple development models. Based on what is your target platform, and what is your target scenario, you can select one or more of the models that are illustrated in this article.

SharePoint Framework

Applies to: Office 365 | SharePoint Online | SharePoint 2016 FP2

The SharePoint Framework (SPFx) is a page and web part model that provides full support for client-side SharePoint development, easy integration with SharePoint data, and support for open source tooling. With the SharePoint Framework, you can use modern web technologies and tools in your preferred development environment to build productive experiences and apps that are natively responsive and mobile-ready. The SharePoint Framework works for SharePoint Online and for on-premises (from SharePoint 2016 Feature Pack 2 forward). You can built client-side web parts and SharePoint Framework Extensions with the SharePoint Framework.

Articles

Samples

Tools

Videos

SharePoint Add-Ins

Applies to: SharePoint 2013 | SharePoint 2016 | SharePoint Online

The SharePoint Add-In model is a development model for SharePoint Online and SharePoint 2013/2016 on-premises. The main goal of this model is to make developers able of customizing and extending SharePoint sites without the need of having full trust access to the target farm, being able to work remotely with client-side code, which is based on the Client Side Object Model (CSOM) and the REST API of SharePoint.

This goal adheres perfectly to the cloud offering model and philosophy. Users can discover and download SharePoint Add-ins from a public SharePoint add-in store or from their organization's corporate add-in catalog. With the SharePoint Add-In model you can create SharePoint-hosted and provider-hosted solutions. The former are just client-side and JavaScript based applications, hosted in SharePoint. The latter typically are .NET applications hosted on Microsoft Azure, or on any other hosting platform. With the SharePoint Add-In model you can create:

  • Full-page solutions: an immersive full-page experience that can have the look and feel of a SharePoint page.
  • App-Parts: parts of a webpage, using a special kind of control called an add-in part, to surface an iframe element that contains the add-in.
  • UI Custom Actions: UI commands that extend ribbons and menus for lists, documents, and more.

Moreover, a SharePoint Add-in can include classic SharePoint components such as lists, custom website pages, web parts, workflows, content types, and many other artifacts.

Articles

Samples

Solutions

Videos

Sandbox Solutions

Applies to: SharePoint Online | SharePoint 2013 | SharePoint 2016

A sandbox solution enables site collection administrators to install custom solutions in Microsoft SharePoint without the involvement of a tenant administrator. However, this freedom requires that sandbox solutions be limited in what they can deploy, what code they can execute, and what resources they can access. Typically sandbox solutions are used to deploy SharePoint assets, like site columns, content types, lists and libraries. It's however recommended to rather use remote provisioning patterns than these classic feature xml based models.

Code-based sandbox solutions were deprecated back in 2014 and in SharePoint Online this capability was completely removed. Code-based sandbox solutions are also deprecated in SharePoint 2013 and in SharePoint 2016, even if there you can still create them. However, be careful that any code-based sandbox solution could be a road blocker for migrating to SharePoint Online.

Articles

Solutions

Videos

Farm Solutions

Applies to: SharePoint 2013 | SharePoint 2016

SharePoint Farm Solutions are trusted SharePoint extensions whose custom logic calls the SharePoint server object model and runs with full trust on the SharePoint servers. These solutions are primarily for custom administrative extensions of SharePoint, such as timer jobs, custom Windows PowerShell commands, and extensions of Central Administration.

Farm Solutions are distributed as SharePoint solution packages that farm administrators upload to a farm-wide storage location from which they can be deployed. Components in Farm Solutions can have farm, web application, site collection, or website scope. The Farm Solutions are supported in SharePoint on-premises only.

Articles

Script Editor or Content Editor web part

Applies to: SharePoint Online | SharePoint 2013 | SharePoint 2016

Script Editor or Content Editor web parts are quite popular way to embed any custom JavaScript code into SharePoint pages. The goal of such kind of technique is to run custom client-side code in the context of the current user within the current SharePoint page. You can use external JavaScript libraries, and host your custom code in SharePoint, without the need for an external hosting environment.

This however raises a security challenges as scripts can be deployed to SharePoint site without any coordination from the administrators. To address this security concern, SharePoint Online sites (both modern and classic) by default do not support adding scripts to to the sites. This is blocked by so called no-script setting, which can be controlled by SharePoint Online tenant administrators.

Moreover any custom code hosted within the Script Editor web part does not have any kind of maintenance capability, governance, or life-cycle management. That's why starting from 2017 Microsoft introduced the SharePoint Framework model, which is similar to the Script Editor web part, but works in the "modern" UI, supports the no-script flag and provides centralized governance and control for the SharePoint administrators.

Articles