There are two basic kinds of SharePoint Add together-ins: SharePoint-hosted and provider-hosted. To brand the best conclusion nearly the correct kind to develop for your scenario, start by learning what both types of SharePoint Add-ins have in mutual.

Notation

A device app, such as mobile app, isn't really a "SharePoint Add-in" even when it accesses SharePoint. The same is true of a spider web application that is launched from outside of SharePoint. If you lot want to develop any of these kinds of apps, see Access SharePoint from mobile and native device apps.

  • A SharePoint Add-in is a self-independent piece of functionality that extends the capabilities of SharePoint websites to solve a well-defined business problem.
  • Add-ins don't take custom code that runs on SharePoint servers. Instead, all custom logic moves "upward" to the cloud, or "down" to client computers, or "over" to an on-premises server that is outside the SharePoint farm or SharePoint Online subscription. Keeping custom code off SharePoint servers provides reassurance to SharePoint administrators that the add-in can't harm their servers or reduce the performance of their SharePoint Online websites.
  • Business logic in a SharePoint Add-in can admission SharePoint data through one of the several client APIs included in SharePoint. Which API you use for your add together-in depends on certain other design decisions y'all make.
  • Almost all major types of SharePoint components can be role of a SharePoint Add-in, including pages, lists, workflows, custom content types, list templates, spider web parts, and more than.
  • The SharePoint websites where SharePoint Add-ins are installed, and from which users launch them, are called host webs. The SharePoint components, however, are by and large in a special kid web of the host web chosen the add-in web.
  • SharePoint Add-ins can fit into a SharePoint website in several ways:
  • All SharePoint Add together-ins that users install get a tile on the Site Contents page of the SharePoint website. Clicking the tile runs the add-in.
  • A SharePoint Add-in is configured using an add-in manifest —an XML file that declares the add-in's basic properties, where it runs, and what SharePoint should practise when the add-in starts. Among other things, the manifest can specify what languages the add-in supports, what SharePoint services and functionality information technology depends on, and the permissions to the host web that the add-in needs. (SharePoint Add-ins have full control of their ain add-in web.)
  • You distribute SharePoint Add together-ins in add-in packages that ever include at to the lowest degree the add-in manifest. (If there are no SharePoint components, the add-in manifest may exist the merely thing in the add-in package.) If the add-in has SharePoint components in an add-in web, these are included in the package as a set of XML files. Remote components that are hosted outside of SharePoint, such as a remote web application or database, are not included in the bundle and are deployed separately from the add-in package. (Yet, the add together-in manifest does specify the URLs of the remote components.)
  • Add together-in packages can also include Part Add together-ins. When the SharePoint Add-in is installed, the Office Add-in is added to an Office Add-ins itemize in SharePoint. Users can install it from the catalog into Office applications such as Word or Excel.

Tip

Take a await at a few SharePoint Add-ins in the Office Store to get a sense of what you can develop. Or open a SharePoint website and install some of the costless SharePoint Add-ins. Just navigate to Site Contents | add an add-in | SharePoint Store.

We've deprecated sandboxed solutions that incorporate custom server-side code. We still back up "No code" sandboxed solutions and sandboxed solutions that contain merely JavaScript.

SharePoint Add-ins don't use the server-side SharePoint object model. The customer-side object models are greatly expanded in SharePoint. Although some APIs in the SharePoint server object model aren't bachelor in the client object models, these are almost entirely administrative and security-related classes. Custom SharePoint logic that addresses these areas is more appropriate for a Windows PowerShell script or classic SharePoint subcontract solution. To learn how to choose among SharePoint Add-ins, classic SharePoint farm solutions, and sandboxed solutions, see SharePoint Add-ins compared with SharePoint solutions.

2 ways to distribute or sell an add-in package

Yous can distribute an add together-in package in two means:

  • To an organization'due south add together-in catalog, which is a dedicated SharePoint site collection in the SharePoint Online subscription or on-premises farm. This method is used when the add-in is custom-made for a particular organization.
  • To the Office Store. The shop handles the marketing process for you, from discovery to purchase to updates. Microsoft has a Seller Dashboard to help you sell add-ins through the Office Store.

Later on yous deploy the add-in in either style, information technology's bachelor for installation on the add an add-in page of SharePoint websites. If the add-in needs permissions to the host spider web or its parent subscription, SharePoint prompts the user who installs the add-in to grant those permissions.

When you need to update an add-in to ready a problems or to add together functionality, make the changes and raise the add together-in's version number in the add-in manifest. And then redeploy the add-in bundle to the shop or add-in itemize. Within 24 hours, users get a notice in the SharePoint UI that an update is available. They tin install the update with a single click.

Comparison SharePoint-hosted and provider-hosted apps

SharePoint-hosted SharePoint Add together-ins

SharePoint-hosted add-ins consist almost entirely of SharePoint components in an add together-in web. They are sometimes said to have their center in SharePoint.

Like all SharePoint Add-ins, a user can run a SharePoint-hosted add-in from a tile on the Site Contents page of the SharePoint website to which it's installed. Optionally, information technology tin too take 2 other kinds of UI components in the host spider web: add-in parts and custom deportment (that is, custom ribbon buttons or menu items). Everything else in a SharePoint-hosted add-in is deployed to the add-in spider web. These components are defined declaratively using XML files, and they can include, among others:

  • Custom pages
  • Workflows
  • Modules (sets of files)
  • List templates
  • List and library instances
  • Custom list forms and views
  • Custom content types
  • Web templates
  • Congenital-in columns (not custom columns)
  • Congenital-in web parts (non custom web parts)
  • JavaScript files
  • Custom buttons and menu items for the add-in web

All business organization logic in a SharePoint-hosted add-in uses JavaScript, either direct on a custom folio or in a JavaScript file that is referenced from a custom page. A JavaScript version of the SharePoint object model (JSOM) is available to make information technology simple for the add-in to perform Crud (create, read, update, and delete) operations on SharePoint information.

Custom pages in a SharePoint-hosted add-in are generally ASP.NET pages (ASPX), and they can declaratively reference ASP.Net and in-the-box SharePoint controls, but there can be no code behind. However, you tin customize the SharePoint controls by using a client-side rendering pick and custom JavaScript.

The JavaScript in SharePoint-hosted add-ins tin can access data and resources that are exterior of the add together-in web past using either of ii techniques for safely working effectually the browser's same origin policy: a special JavaScript cross-domain library or a specific JavaScript WebProxy class. Using these techniques, a SharePoint-hosted add-in can work with information on the host web, its parent subscription, or anywhere on the Internet.

Provider-hosted SharePoint Add-ins

Any SharePoint component that can be in a SharePoint-hosted add-in tin can also be in a provider-hosted add-in. But provider-hosted add together-ins are distinguished from SharePoint-hosted add-ins because they include at to the lowest degree one remote component, such as a web application, service, or database, that is hosted externally from the SharePoint subcontract or SharePoint Online subscription. This could be a server in the same corporate network as a SharePoint subcontract or a cloud service. The external components can be hosted on any spider web hosting stack, including the Linux, Apache, MySQL, and PHP (LAMP) stack.

Note

The "provider" is whoever owns the server or deject account. Information technology can be the aforementioned company or organization that owns the SharePoint farm or SharePoint Online tenancy where the add-in is to be installed. Simply the developer of the add-in tin can also be the provider. Typically, when an add-in is created for an arrangement, the arrangement provides the hosting. Even so, when an add-in is created for multiple organizations, information technology'south more likely that the programmer hosts the remote components. Programmer-hosting is mandatory if the SharePoint Add-in is being marketed through the Office Store, because the developer doesn't have whatever contact information for the add together-in purchasers. In this scenario, the various instances of the add-in know the URI of the remote component because it is specified in the add-in manifest.

You have consummate flexibility for the hosting framework that yous use for the remote components. You don't have to use a Microsoft stack. Any web hosting framework tin be used, including LAMP (Linux, Apache server, MySQL, PHP), MEAN (MongoDB, ExpressJS, AngularJS, Nodejs), Coffee, Python, and others, and you lot are welcome to use non-Microsoft development tools. In addition, the remote components can be hosted in non-Microsoft deject services.

You can requite remote pages in the add together-in the wait and feel of SharePoint pages by using a special chrome control.

Remote data tin be blobs, caches, message queues, content delivery networks (CDN), and databases, amid others. And databases can exist any type including relational and object-oriented. The remote data tin be accessed in a diversity of ways. For example, yous can use Business Connectivity Services (BCS) to surface the information in a SharePoint listing. Another option is to expose information in a grid on a page of a remote web application.

SharePoint Add-ins use SharePoint APIs to connect and integrate with SharePoint features—search, workflow, social networking, taxonomy, user profiles, BCS, and more than. This lets them read documents, exercise searches, connect people, and perform Grime operations. There is more than than ane ready of the APIs:

  • When the remote components are implemented with .NET, the managed lawmaking SharePoint Client-Side Object Model (CSOM) library is available.
  • For remote components that are not based on .Internet, a set of REST/OData APIs can be used to access SharePoint information. These can also be used from a .Cyberspace customer if you adopt working with an OData interface.
  • The JSOM library, mentioned before, cannot be used on a remote page, but provider-hosted add-ins can have custom SharePoint pages in an add-in web, and JavaScript on these pages tin can use the JSOM library.

Provider-hosted add-ins that access SharePoint are security principals only as users and groups are. The add-in principal has to be authenticated and authorized, just equally the user does. The add-in needs permissions to perform operations on SharePoint data in the host spider web. In virtually scenarios, the effective permissions of a user working with SharePoint through a SharePoint Add-in are the intersection of the user'due south and the add together-in's permissions, although there are some scenarios in which a user can do things with an add together-in that she wouldn't otherwise take permission to do.

Provider-hosted add-ins can connect to any internal or public spider web service and, dissimilar SharePoint-hosted add-ins, they tin handle SharePoint list and listing item events, such equally adding an item to a document library.

Ready to get started?

  • If you are an experienced SharePoint developer, we recommend that you start with SharePoint-hosted add-ins. They're the nearly similar to the kinds of SharePoint extensions that you have made in the by.

    Get started creating SharePoint-hosted SharePoint Add-ins

  • If you are an experienced ASP.NET web awarding developer, we recommend that you beginning with provider-hosted add-ins. They're built around web applications.

    Get started creating provider-hosted SharePoint Add-ins

  • If y'all want to develop a provider-hosted add-in on a not-Microsoft stack, here'south how to become started:

    • Install tools that are appropriate for your stack, if yous don't already have them.
    • Get a developer account on Office 365 for testing and debugging purposes. For details, go to Set up a evolution environment for SharePoint Add-ins on Office 365, or if you already have an Part 365 subscription, you just need to create a Developer Site on it.
    • Your add-in will utilize SharePoint's Balance/OData APIs to perform Grime operations on SharePoint data:
      • Observe our explanatory documentation in the article Become to know the SharePoint Residual service and other articles to which information technology links.
      • Find reference documentation at Balance API reference for SharePoint.
    • If you are not using Visual Studio, you take to create the add-in manifest file and the add-in package. For information, see Explore the app manifest structure and the package of a SharePoint Add-in. At that place are a lot of fourth dimension-saving advantages to using Visual Studio and Microsoft Function Developer Tools for Visual Studio to make your manifest and parcel. We recommend that you lot consider them, even if you use another tool to create the remote web application itself. The Community edition of Visual Studio is complimentary.
    • There are sample provider-hosted add-ins for some non-Microsoft languages and platforms in the OfficeDev section of GitHub; for instance, PHP-App-for-SharePoint.

Notation

If you're a beginner at both SharePoint and spider web development, yous'd benefit most past starting with the costless course at Microsoft's Virtual Academy, or working through a book nigh SharePoint development.

Meet likewise

  • SharePoint glossary