开发 SharePoint 加载项Develop SharePoint Add-ins

查找更详细的文章和资源来帮助你构建 SharePoint 加载项的高级功能。Find in-depth articles and resources to help you build advanced capabilities into your SharePoint Add-ins.


本文假设你熟悉文章 SharePoint 加载项以及文章所链接到的入门材料。This article assumes that you are familiar with the article SharePoint Add-ins and the getting started material that it links to.

在“开发”**** 下方,我们提供以下内容帮助解释你可在 SharePoint 加载项中执行的所有不同操作:Under Develop, we've got the following to help explain all the different things you can do in a SharePoint Add-in:

  • 深入概述In-depth overviews
  • 操作方法文章How-to articles
  • 代码段Code snippets

您将找到与以下内容相关的文章:You'll find articles about:

  • 对列表执行创建、读取、更新和删除 (CRUD) 操作Performing create, read, update, and delete (CRUD) operations on lists
  • 如何生成 REST 查询并与新的 API 进行交互How to build REST queries and interact with the new APIs
  • 安全配置 OAuth 的方式和时间How and when to configure OAuth for security

SharePoint 具有企业社交功能(如活动源和用户配置文件)以及企业内容管理功能、业务线 (LOB) 互操作性功能和网站设计功能,这些功能可以使你的加载项与众不同。在添加 SharePoint 功能中了解有关这些功能的详细信息。SharePoint has enterprise social features such as activity feeds and user profiles, along with enterprise content management features, line-of-business (LOB) interoperability features, and website design features that can really make your add-ins stand out. Learn more about them in Add SharePoint capabilities.

代码是关键,因此,请了解一下开发人员中心中的“示例”菜单。它是指向外接程序的代码示例的直接链接。在您设置开发环境后,您应检查其中的几个示例。如果您对我们的代码示例不感兴趣,请使用社区功能请求一个代码示例。我们将接受这些请求以及其他文档反馈,并将其融入我们对内容和示例的持续更新中。因此,请告诉我们您希望看到的内容!And, code is key, so take a look at the "Samples" menu in the Dev Center. It's a direct link to our code samples for add-ins. As soon as you've set up your development environment, you should check out a few of our samples. Take advantage of a community feature that lets you request a code sample if we don't have one you'd like to see. We take those requests, along with other doc feedback and use them in our continuous updates to the content and samples. So please, let us know if you'd like to see something!

开始使用 SharePoint 加载项资源Get started with SharePoint Add-ins resources

如果要开始开发 SharePoint 加载项,首先请阅读 SharePoint 加载项。该页将你指向可获得对不同类型的 SharePoint 加载项的快速认知的重要文章。在进行更高级的 SharePoint 加载项开发前,最好从要构建的加载项种类、要包含的技术以及要使用的托管选项开始。If you're just getting started with developing SharePoint Add-ins, first take a look at SharePoint Add-ins. That page points you to key articles to get you acquainted quickly with the different kinds of SharePoint Add-ins. Before doing more advanced kinds of development with SharePoint Add-ins, you should start with a good idea of the kinds of add-ins that you want to build, the technologies that you want to include, and the hosting options that you want to use.

使用客户端对象模型、JavaScript 对象模型和 REST 终结点在 SharePoint 中开发 SharePoint 加载项的基本任务和资源Essential tasks and resources for developing SharePoint Add-ins using the client object model, JavaScript object model, and REST endpoints in SharePoint

不管您决定构建哪种类型的 SharePoint 外接程序,您的外接程序将始终通过某种方式与 SharePoint 网站交互。表 1 中的文章介绍了如何使用可供您在 SharePoint 外接程序中使用的下列三个接口对 SharePoint 网站执行许多非常重要的工作:客户端对象模型、JavaScript 对象模型和 REST 终结点。No matter what kind of SharePoint Add-in you decide to build, your add-in will always interact in some way with a SharePoint site. The articles in Table 1 describe how to do many of the most important kinds of work with SharePoint sites by using three interfaces that are available for you to use in your SharePoint Add-ins: the client object model, the JavaScript object model, and REST endpoints.

表 1. 使用 SharePoint 客户端对象模型、JavaScript 对象模型和 REST 接口执行的基本操作Table 1. Basic operations with the SharePoint client object model, JavaScript object model, and REST interface

主题Topic 说明Description
使用 SharePoint 客户端库代码完成基本操作Complete basic operations using SharePoint client library code 解释如何通过使用 C# 和客户端对象模型来执行常见操作。Explains how to do common operations by using C# and the client object model.
使用 SharePoint 中的 JavaScript 库代码完成基本操作Complete basic operations using JavaScript library code in SharePoint 解释如何通过使用 JavaScript 对象模型来执行常见操作。Explains how to do common operations by using the JavaScript object model.
使用 SharePoint REST 终结点完成基本操作Complete basic operations using SharePoint REST endpoints 解释如何通过使用 REST 接口来执行常见操作。Explains how to do common operations by using the REST interface.

了解使用 SharePoint 加载项进行开发的基本概念Learn the fundamental concepts for development with SharePoint Add-ins

除了解基本操作之外,还应了解 SharePoint 加载项开发模型的基本概念。In addition to understanding the basic operations, you should understand the fundamental concepts of the SharePoint add-in development model. 每一种 SharePoint 加载项都包含一个加载项清单文件,并内置于部署到 SharePoint 网站的加载项包中。Every kind of SharePoint Add-in contains an add-in manifest file and is built into an add-in package that you deploy to a SharePoint site. 在开发各种加载项时,必须考虑有关身份验证和授权、数据访问和可用性的一系列问题。When you develop any kind of add-in, you must consider a range of issues related to authentication and authorization, data access, and usability. 表 2 中的文章将介绍这些问题,并针对要创建的任何一种加载项解释其含义。The articles in Table 2 acquaint you with these issues and explain their implications for any kind of add-in that you want to create.

表 2. 使用 SharePoint 加载项进行开发的基本概念Table 2. Fundamental concepts for working with SharePoint Add-ins

主题Topic 说明Description
SharePoint 外接程序的授权和身份验证Authorization and authentication of SharePoint Add-ins 指导你熟悉与获取开发 SharePoint 资源所需的权限相关的核心概念。Guides you through core concepts related to acquiring the necessary privileges for working with SharePoint resources.
浏览应用部件清单 (manifest) 结构和 SharePoint 外接程序包Explore the app manifest structure and the package of a SharePoint Add-in 解释外接程序清单的工作方式和外接程序包的生成方式。Explains how add-in manifests work and how add-in packages are built.
在 SharePoint 中创建 UX 组件Create UX components in SharePoint 探讨在 SharePoint 外接程序中生成丰富用户体验的方法。Explores the ways in which you can build a rich user experience in SharePoint Add-ins.
在 SharePoint 中处理外部数据Work with external data in SharePoint 解释数据访问选项以及不同种类的 SharePoint 外接程序所提供的技术。Explains the data access options and techniques that are available in different kinds of SharePoint Add-ins.
许可 Office 和 SharePoint 加载项License your Office and SharePoint Add-ins 指导你完成 Office 和 SharePoint 加载项的加载项许可框架。Guides you through the add-in license framework for Office and SharePoint Add-ins.

将各个部分组合在一起:通过集成功能构建高级 SharePoint 加载项Put the pieces together: Building advanced SharePoint Add-ins by integrating capabilities

如果您熟悉 SharePoint 外接程序的各种功能和特征,则可通过满足您的要求的各种方式将所有功能放置在一起来开始构建更复杂的外接程序。表 3 中的文章介绍如何集成功能和创建功能更全面的 SharePoint 外接程序。When you are familiar with the capabilities and features of SharePoint Add-ins, you can start building more complex add-ins by putting all of the pieces together in ways that suit your requirements. The articles in Table 3 demonstrate how to integrate capabilities and create more fully featured SharePoint Add-ins.

表 3. SharePoint 外界程序中的高级概念Table 3. Advanced concepts in SharePoint Add-ins

主题Topic 说明Description
创建包括自定义 SharePoint 列表和内容类型的提供程序托管的外接程序Create a provider-hosted add-in that includes a custom SharePoint list and content type 解释如何创建托管在云中的 SharePoint 加载项以及包含自定义 SharePoint 列表和内容类型的 SharePoint 加载项。Explains how to create SharePoint Add-ins that are hosted in the cloud and that include custom SharePoint lists and content types.

另请参阅See also