Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
SharePoint Development with the SharePoint Framework

You're reading from   SharePoint Development with the SharePoint Framework Design and implement state-of-the-art customizations for SharePoint

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781787121430
Length 386 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Authors (2):
Arrow left icon
Jussi Roine Jussi Roine
Author Profile Icon Jussi Roine
Jussi Roine
Olli Jääskeläinen Olli Jääskeläinen
Author Profile Icon Olli Jääskeläinen
Olli Jääskeläinen
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Introducing SharePoint Online for Developers FREE CHAPTER 2. Developing Solutions for SharePoint 3. Getting Started with the SharePoint Framework 4. Building Your First Web Part 5. Using Visual Studio Code and Other Editors 6. Packaging and Deploying Solutions 7. Working with SharePoint Content 8. Working with the Web Part Property Pane 9. Using React and Office UI Fabric React Components 10. Working with Other JavaScript Frameworks 11. Troubleshooting and Debugging SharePoint Framework Solutions 12. SharePoint APIs and Microsoft Graph 13. The Future of SharePoint Customizations

Development tooling for SharePoint Online

So far we've established that solutions built for SharePoint Online historically have been mostly about sandboxed solutions, custom scripts embedded on pages with the Script Editor Web Part, and custom add-ins that are either hosted within SharePoint or separately in Microsoft Azure (or a similar environment).

Developers use a reasonably new version of Visual Studio development tooling to build, package, and deploy their code to SharePoint Online. This can be Visual Studio 2015 or 2017, or newer when one becomes available. By installing Office Development Tools during Visual Studio installation, developers get to enjoy the pre-built templates for new projects that target SharePoint Online.

The only template that can be reasonably used today is the SharePoint Add-in template:

  1. This template allows for the creation of a SharePoint add-in that can be either a SharePoint-hosted add-in or a Provider-hosted add-in. During the initial creation of the project, you can specify the target site for development, and this can be the developer site you created earlier within your SharePoint Online tenant:
  1. Note that if you choose to create a provider-hosted add-in, you'll need to do additional configuration with certificates in order to secure the deployment. For a SharePoint-hosted add-in, no additional configuration is needed and you can start building your solution right away.
  2. The solution consists of a single Feature, the Add-in package, and necessary support files and assets:
  1. When deploying the solution, you can right-click on the project, and select Publish.
  1. This allows you to publish the add-in as a package for manual deployment, or deploy the package to Office Store. Office Store is a marketplace run by Microsoft, allowing for reselling and marketing of your add-in to other organizations.
  2. The packaged add-in can now be manually deployed to your developer site. First, simply upload the add-in package file to your developer site's Apps in Testing document library. Upon completion of the upload, you can simply deploy the app to the same site:
  1. As the add-in is merely a sample add-in, we haven't introduced any additional user permissions we might be needing while impersonating the logged-in user (executing the add-in). As such, we can simply trust the add-in:
  1. The add-in will now install and self-provision within the site:
  1. Installation might take a minute or two. After it completes, the ribbon has a Launch AppButton that becomes enabled when the app is selected in the document library. Clicking the button will call the add-in:
  1. Since we didn't configure the add-in at all and just compiled the default template, the add-in is a full page app. It inherits the SharePoint Online look and feel, but is running in a different base URL to the SharePoint Online site it was launched from:
  1. The add-in calls a small piece of JavaScript to resolve the logged-in user's full name. Everything else is static on the page, including the top-most navigation. The same add-in could also be embedded in a SharePoint page if we add an App Part instruction to tell SharePoint Online it can embed the add-in safely.
You have been reading a chapter from
SharePoint Development with the SharePoint Framework
Published in: Sep 2017
Publisher: Packt
ISBN-13: 9781787121430
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime