SharePoint Development with the SharePoint Framework - Jussi Roine - E-Book

SharePoint Development with the SharePoint Framework E-Book

Jussi Roine

0,0
41,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Design and create beautiful solutions using modern development tools for SharePoint Online

About This Book

  • Get the best out of the latest Sharepoint Framework and leverage the Sharepoint RESTful and JSOM APIs.
  • Develop efficient client side applications with JavaScript injection and Sharepoint Addins.
  • Get the best tips and tricks on designing your website flawlessly.

Who This Book Is For

This book targets current SharePoint developers, as well as people starting their journey on SharePoint development. The reader must have basic web development programming knowledge, including JavaScript and CSS. The reader should have familiarity using and managing SharePoint-based collaboration sites.

What You Will Learn

  • Understand what the SharePoint Framework is
  • Create modern solutions using the new tools, approaches and frameworks
  • Learn how to use Visual Studio Code for effective SharePoint development
  • Package and deploy your code, using automation as needed
  • Work with content and data stored in SharePoint
  • Benefit from third party frameworks without having to build your own frameworks
  • Debug and troubleshoot your code with ease
  • Configure security in your application

In Detail

SharePoint is one of Microsoft's best known web platforms. A loyal audience of developers, IT Pros and power users use it to build line of business solutions.

The SharePoint Framework (SPFx) is a great new option for developing SharePoint solutions. Many developers are creating full-trust based solutions or add-in solutions, while also figuring out where and how SPFx fits in the big picture.

This book shows you how design, build, deploy and manage SPFx based solutions for SharePoint Online and SharePoint 2016.

The book starts by getting you familiar with the basic capabilities of SPFx. After that, we will walk through the tool-chain on how to best create production-ready solutions that can be easily deployed manually or fully automated throughout your target Office 365 tenants.

We describe how to configure and use Visual Studio Code, the de facto development environment for SPFx-based solutions. Next, we provide guidance and a solid approach to packaging and deploying your code.

We also present a straightforward approach to troubleshooting and debugging your code an environment where business applications run on the client side instead of the server side.

Style and approach

The approach will be that of a practical tutorial which will take you through every topic using code samples and working examples.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 328

Veröffentlichungsjahr: 2017

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



SharePoint Development with the SharePoint Framework

 

 

 

 

 

 

 

 

 

 

Design and implement state-of-the-art customizations for SharePoint

 

 

 

 

 

 

 

 

 

 

Jussi Roine
Olli Jääskeläinen

 

 

 

 

BIRMINGHAM - MUMBAI

SharePoint Development with the SharePoint Framework

 

Copyright © 2017 Packt Publishing

 

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

 

First published: September 2017

 

Production reference: 1260917

Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78712-143-0

 

www.packtpub.com

Credits

Authors

Jussi Roine

Olli Jääskeläinen

Copy Editor

Safis Editing

Reviewer

Bill Ayers

Project Coordinator

Ritika Manoj

Commissioning Editor

Amarabhab Banerjee

Proofreader

Safis Editing

Acquisition Editor

Siddharth Mandal

Indexer

Rekha Nair

Content Development Editor

Mohammed Yusuf Imaratwale

Graphics

Jason Monteiro

Technical Editor

Prashant Mishra

Production Coordinator

Shantanu Zagade

About the Authors

Jussi Roine started working with SharePoint with the very first version, SharePoint Portal Server 2001, in late 2000. With a strong infrastructure and development background by then, and also having worked quite a bit on Linux-based solutions, SharePoint fascinated him with its seemingly endless potential and easiness for end users. He continued working with SharePoint through all the versions since, including SharePoint Portal Server 2003, MOSS 2007, and SharePoint 2010, 2013, and 2016. He also enjoyed working with customers when they started moving beyond on-premises to the early cloud-based offerings on BPOS and Office 365, later in 2011. He has been a Microsoft Most Valuable Professional since 2014, and a Microsoft Certified Trainer since 2006. In 2012 and 2014, he had the honor of attending the Microsoft Certified Master (later Microsoft Certified Solutions Master) program, which he passed among the very selected few in the world at the time. In 2017, Jussi became a Microsoft Regional Director, a member of 150 of the world’s top technology visionaries chosen for their community leadership and cross-platform expertise. Having providing his clients with solutions, architectures, and trusted advisor services for 25 years now, he has also had a chance to dive deeply into Microsoft Azure, which connects and integrates with Office 365 robustly. Over the years, he has written several books on SharePoint, the Office clients, productivity, flexwork, and Microsoft platforms. This book is his first international book aimed at a more diverse audience, and he hopes that this book will help current and future developers working on the Office 365 platform to more easily provide superior solutions for their clients using SharePoint Framework.

 

Olli Jääskeläinen is a Microsoft MVP, Microsoft Certified Master (MCM), and Microsoft Certified Trainer (MCT). Olli has been working in the field for over 15 years. He knows SharePoint inside out and is currently focusing on building productivity solutions using Office 365. Olli works as an architect for Sulava and as an organizer for the Office 365 and SharePoint User Group Finland. He has been giving technical presentations since 2013 at events such as TechDays Finland, European SharePoint Conference, TechTalks Finland, SharePoint Saturdays, and Office 365 Engage.

About the Reviewer

Bill Ayers is a consultant developer and solution architect who has been working with SharePoint since the 2003 version of the product. He is a Microsoft Certified Master and Charter MCSM, and a Microsoft Certified Trainer and Office Development MVP. He specializes in Microsoft Office, SharePoint, Office 365, and mobile solutions, with a particular focus on agile software development practices. He has over 25 years of experience in the software industry and speaks regularly at international conferences and user groups. He is also a moderator on SharePoint.StackExchange.com, and blogs occasionally at http://SPDoctor.com/. He is based in Sheffield, UK.

www.PacktPub.com

For support files and downloads related to your book, please visit www.PacktPub.com.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

https://www.packtpub.com/mapt

Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.

Why subscribe?

Fully searchable across every book published by Packt

Copy and paste, print, and bookmark content

On demand and accessible via a web browser

Customer Feedback

Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review.

If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!

Table of Contents

Preface

What this book covers

What you need for this book

Who this book is for

Conventions

Reader feedback

Customer support

Downloading the example code

Errata

Piracy

Questions

Introducing SharePoint Online for Developers

What is SharePoint Online?

SharePoint sites and site collections

SharePoint document libraries

SharePoint lists

SharePoint web parts

Why SharePoint Online?

Office 365 licensing

Choosing an Office 365 license for development use

Getting started with SharePoint Online

Creating new site collections

A word or two on SharePoint site templates

Site definitions

Site templates

Web templates

SharePoint Online and site templates

Creating a new site collection

Developer sites versus team sites

SharePoint Online APIs

A quick primer on Microsoft Graph

Developing solutions for SharePoint Online

Solutions for SharePoint and SharePoint Online

SharePoint 2001-2003: direct modification of files

SharePoint 2007--Full-trust code

SharePoint 2010 and SharePoint Online: sandbox solutions

SharePoint 2013, SharePoint 2016, and SharePoint Online: add-ins

SharePoint Online--add-ins and client-side scripts

Development tooling for SharePoint Online

Summary

Developing Solutions for SharePoint

Introducing the SharePoint Framework

SharePoint extensibility

Philosophy of the SharePoint Framework

Types of projects the SharePoint Framework supports

Key features of the SharePoint Framework

Toolchain

npm

Yeoman and Yeoman SharePoint generator

Gulp

Visual Studio Code

Browser developer tools

SharePoint Workbench

Introducing Office Developer Patterns and Practices

Office Developer Patterns and Practices in practice

Contributing to Office Dev PnP

Application life cycle management with SharePoint customizations

Managing and versioning source code and assets

GitHub

Visual Studio Team Services

Deploying, retracting, and managing solutions

Summary

Getting Started with the SharePoint Framework

Setting up your development environment

Step 1 - Installing Node.js

Step 2 - Node package manager

Step 3 - Installing Yeoman and Gulp

Step 4 - Installing the Yeoman SharePoint generator

Step 5 - Install Visual Studio Code

Testing your SharePoint Framework development environment

Step 1 - Creating a folder for the web part

Step 2 - Running the Yeoman SharePoint generator

Step 3 - Installing the developer certificate

Step 4 - Running the web part on a local workbench

Anatomy of the SharePoint Framework web part project

Main folders and root level configuration files

TypeScript basics in the SharePoint Framework

Key files of the SharePoint Framework web part projects

Summary

Building Your First Web Part

Creating a feedback list

Creating the feedback web part project

Setting web part basics

Building feedback web part user experience

Testing the user interface

Saving the feedback

Testing and troubleshooting the web part

Ideas for fine tuning the web part for production use

Using Office 365 to build better business process

Building smarter controls

Provisioning of the Feedback list and other resources

Localization

Localizing web part manifest

Localizing texts

Calendar and currency

Summary

Using Visual Studio Code and Other Editors

Introducing Visual Studio Code

Installing Visual Studio Code

Getting to know Visual Studio Code

Changing the color theme

Working with files

Extensions

Working with the SharePoint Framework in Visual Studio Code

Running commands with the Integrated Terminal

Using Visual Studio instead of Visual Studio Code

Summary

Packaging and Deploying Solutions

Overview of packaging and deploying

Packaging SharePoint Framework solutions

Using Gulp to package a project

Deploying SharePoint Framework solutions

App Catalog

Installing the app

Deploying assets

SharePoint Online CDN and Microsoft Azure CDN

Configuring a SharePoint Online CDN

Updating the project to support a SharePoint Online CDN

Deploying assets to a SharePoint Online CDN

Configuring Microsoft Azure Storage CDN

Updating the project to support Microsoft Azure CDN

Deploying assets to Microsoft Azure CDN

Summary

Working with SharePoint Content

Overview of working with SharePoint content

Using mock data

Using mock data with locally hosted SharePoint Workbench

Step 1 - create data model

Step 2 - create MockSharePointClient

Step 3 - consume the mock data in the web part

Accessing real data with SPHttpClient

Working with SharePoint lists

Requesting the list of lists with SPHttpClient

Checking if the list exists and creating lists

Working with SharePoint list items

Creating an Office 365 Group and new SharePoint list

Basic operation with SharePoint list items using SPHttpClient

Step 1 - create a hello-listitems web part project

Step 2 - add a data model for list items

Step 3 - build the user interface for the web part

Step 4 - define the function that will make SPHttpClient request to read list items and test the web part

Step 5 - implementing the _runOperation function and building a skeleton for CRUD operation functions

Step 6 - implementing the create operation

Step 7 - implementing the read operation

Step 8 - implementing the update operation

Step 9 - implementing the delete operation

Summary

Working with the Web Part Property Pane

Web part property pane

Property panes in classic web parts

Property panes in SharePoint Framework web parts

Implementing a property pane

Fields in property panes

Implementing headers, groups, and fields

Implementing multiple pages in property panes

Handling property field events

Implementing custom properties in a property pane

Defining a custom field type

Summary

Using React and Office UI Fabric React Components

Overview

Understanding React

React is declarative

React is component-based

Introduction to Fabric React components

Fabric React support

How to obtain Fabric React for your web part

Using Fabric React components

Button

Dialog

TextField

Using React and Office UI Fabric React components in SharePoint Framework web parts

Creating the SharePoint Framework React To-do web part

Step 1 - Creating a React web part project

Step 2 - Adding Office UI Fabric React to the project

Step 3 - Examining the React project structure

Step 4 - Creating the ITodoItem interface and mockup data

Step 5 - Implementing a to-do list in React and Fabric React components

Modifying the web part file

Modifying the ReactTodo component

Creating TodoItemComponent

Summary

Working with Other JavaScript Frameworks

Overview

Using jQuery in SharePoint framework web parts

Loading jQuery from CDN

Bundling jQuery to the web part package

Knockout

AngularJS and Angular

Using SharePoint patterns and practices JavaScript Core Library

Accessing user profiles

Sending email

Working with lists and list items

Working with JavaScript libraries

Additional considerations

Summary

Troubleshooting and Debugging SharePoint Framework Solutions

Troubleshooting

Ensuring an up-to-date npm

Updating the Yeoman template version

Troubleshooting the npm cache

Optimization

Optimizing the SharePoint Framework packages

Loading external packages

Debugging solutions

Debugger statements using browser developer tools

Debugging with source maps

Debugging in Visual Studio Code

Summary

SharePoint APIs and Microsoft Graph

SharePoint APIs

SharePoint REST APIs

Accessing SharePoint Online with CSOM using a console app

Accessing SharePoint Online with REST using a console app

Accessing REST APIs with SharePoint Framework

Microsoft Graph

What is Microsoft Graph?

Accessing Microsoft Graph with Graph Explorer

Accessing Microsoft Graph with SharePoint Framework

Summary

The Future of SharePoint Customizations

The future of SharePoint developers

Our recommendations for developers

The SharePoint Framework support in SharePoint 2016

Is SharePoint Framework the final framework for SharePoint developers?

Summary

Preface

SharePoint Framework is the new, modern, and fresh approach for implementing customizations in SharePoint and SharePoint Online. It’s a client-side approach to a server-side problem, allowing developers already familiar with JavaScript, HTML, and CSS to implement lightweight custom functionality for SharePoint.

In the past, SharePoint-based development has been challenging, complex, poorly documented and full of changing directions from Microsoft.

Originally, in early 2000, the guidance, was not to modify or customize SharePoint. Microsoft was saying at the time not to touch anything and simply to use SharePoint as a portal service that hosts your content and documents. With newer versions of SharePoint for on-premises deployments, Microsoft initially introduced a somewhat home-brewed approach to implementing custom web parts (widgets on a page) and UI elements. This included legacy .bat files, weird file formats, numerous modifications to XML files with minimal documentation and a cryptic approach to provisioning your solutions between different environments.

Between then and now we’ve also had different models for developing solutions for SharePoint in the cloud; this included a better approach to implementing features without deploying server-side code, but by the time this was made available developers were already familiar with Microsoft .NET-based customizations on the server-side. Giving a replacement client-side model that had strict rules and security restrictions did not go down easily for seasoned SharePoint developers.

Finally, now with the SharePoint Framework, we have a documented framework for implementing UI elements, custom web parts, and features for SharePoint 2016 in on-premises and SharePoint Online in Office 365. It is still early days, but we’re already seeing good uptake from developers who can now finally and confidently migrate their existing code to the cloud while simultaneously switching from .NET-based development languages to TypeScript, which is a superset of JavaScript.

This book will take you from a Hello World-implementation in SharePoint Framework to implementing enterprise-ready functionality with ease. We’ll walk you through the essential knowledge you need in order to survive in a modern project that aims to use SharePoint Framework as the core development model. In addition, the necessary tools are explained, as well as debugging and troubleshooting. Obviously, you might still be using other JavaScript frameworks, such as jQuery, AngularJS, and React so we have guidance on that too – because SharePoint Framework does allow and support you to use other frameworks while implementing SharePoint functionality.

This book will provide an invaluable resource for all those seeking to use and learn the SharePoint Framework as their development model for SharePoint.

What this book covers

Chapter 1, Introducing SharePoint Online for Developers, will give you a short history lesson to understand the limitations of the previous development models for SharePoint. You will begin to see how and where SharePoint Framework differs the most and why it matters.

Chapter 2, Developing Solutions for SharePoint, will introduce you to SharePoint Framework in more detail. It covers the types of project you can implement and reveals how to code and start using the necessary tools quickly.

Chapter 3, Getting Started with SharePoint Framework, walks you through installing the toolchain and verifying everything is installed correctly. You’ll learn how project files are laid out and where to find what.

Chapter 4, Building Your First Web Part, you will code your own SharePoint Framework-based web part and deploy it locally for testing and in SharePoint for real use.

Chapter 5, Using Visual Studio Code and Other Editors, shows you how to get started with Visual Studio Code, the free editor from Microsoft that fully supports SharePoint Framework projects. You will also learn how to use Visual Studio 2015/2017 if you are more familiar with them.

Chapter 6, Packaging and Deploying Solutions, once development is done, developers need to package and deploy their code in an orderly and managed fashion. You’ll learn about the tools to aid you in this task and how to manually deploy your code to SharePoint.

Chapter 7, Working with SharePoint Content, is the next logical step when implementing solutions with SharePoint Framework. You’ll frequently need to access SharePoint-hosted data such as lists and documents. You will also learn using mock data to quickly get your code working before further testing against live data.

Chapter 8, Working with the Web Part Property Pane, shows you how to create solutions that allow parameters and values from user input, such as settings data for a web part. This way your code can run dynamically regardless of where it is deployed.

Chapter 9, Using React and Office UI Fabric React Components, explains that Microsoft realized early on that developers prefer other frameworks, such as React, and might need to provide a unified UI that implements Microsoft’s design language for SharePoint and Office. With React and Office UI Fabric React you’ll learn how to combine these two frameworks with SharePoint Framework projects.

Chapter 10, Working with Other JavaScript Frameworks, will teach you how to use other popular frameworks, such as jQuery and Angular, to implement your solutions while still using SharePoint Framework

Chapter 11, Troubleshooting and Debugging SharePoint Framework Solutions, discusses efficient troubleshooting techniques to help you find common problems you might encounter. Debugging a SharePoint Framework solution is slightly different from traditional server-side debugging, and this chapter will teach you how to debug your code.

Chapter 12, SharePoint APIs and Microsoft Graph, will give you a run-down of the SharePoint APIs and how they differ from each other. You’ll learn how to access the APIs, and also how to employ Microsoft Graph, the fabric that provides knowledge for most things in Office 365 and Azure Active Directory.

Chapter 13, The Future of SharePoint Customizations, provides a glimpse into the future and what SharePoint Framework means for developers from now on. As development models come and go, we give you several ideas how developers should approach this major change.

What you need for this book

SharePoint 2016 Farm or SharePoint Online tenant (as part of an Office 365 subscription)

Visual Studio Code or Visual Studio 2015/2017

Web browser (Chrome or Internet Explorer or Firefox)

Internet access

Who this book is for

This book is for developers who want to start developing solutions for SharePoint 2016 and/or SharePoint Online using SharePoint Framework. It is also for developers who are already familiar with SharePoint’s development models of the past and who are ready to start using SharePoint Framework for their future projects. Though SharePoint experience is not required, you should have a general understanding of the capabilities that SharePoint provides. We’ll provide a brief overview of SharePoint as well. It is also helpful to have an understanding of JavaScript-based web development.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Create another file, calledMockSharePointClient.ts, in the same folder that the web part is located."

A block of code is set as follows:

import { Environment, EnvironmentType } from '@microsoft/sp-core-library'; import { ISPListItem } from "./ISPListItem"; import MockSharePointClient from "./MockSharePointClient";

Any command-line input or output is written as follows:

gulp serve

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Write inTeam site name, for example, SPFX-testing."

Warnings or important notes appear in a box like this.
Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book-what you liked or disliked. Reader feedback is important to us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail [email protected], and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for this book from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

You can download the code files by following these steps:

Log in or register to our website using your e-mail address and password.

Hover the mouse pointer on the

SUPPORT

tab at the top.

Click on

Code Downloads & Errata

.

Enter the name of the book in the

Search

box.

 

Select the book for which you're looking to download the code files.

Choose from the drop-down menu where you purchased this book from.

Click on

Code Download

.

You can also download the code files by clicking on the Code Files button on the book's web page at the Packt Publishing website. This page can be accessed by entering the book's name in the Search box. Please note that you need to be logged in to your Packt account.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR / 7-Zip for Windows

Zipeg / iZip / UnRarX for Mac

7-Zip / PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/SharePoint-Development-with-the-SharePoint-Framework. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books-maybe a mistake in the text or the code-we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at [email protected] with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at [email protected], and we will do our best to address the problem.

Introducing SharePoint Online for Developers

SharePoint Online is a core part of Office 365, which is a Software as a Service (SaaS) cloud service from Microsoft. SharePoint Online (SPO) is one of the services in Office 365 that companies and organizations typically purchase when they move parts or all of their infrastructure and services to a public cloud service.

In this chapter, we'll take a lap around Office 365 and SharePoint Online, with a strong focus on development models and features that are relevant to you as a developer. In addition we'll provision a new SharePoint site collection that will aid us in testing code we'll write in upcoming chapters. At the end of this chapter, you'll have a good overview of SharePoint Online and the development models that have been, and some of which still are, available to you in on-premises SharePoint and SharePoint Online.

What is SharePoint Online?

SharePoint Online is, depending, who you ask, a development platform, collaboration service, file management system, and intranet service. It's the logical successor and partially a replacement for SharePoint, the on-premises collaboration and productivity platform. It also (partially or fully depending on the business case) replaces file shares, email attachments (through Outlook's support for OneDrive for Business, which is technically part of SharePoint/SharePoint Online), messaging boards, and similar needs for intra-organization or cross-organizational collaboration.

SharePoint Online is a collection of services bundled together, and these are

SharePoint team sites

SharePoint publishing sites

Search

User profiles

InfoPath Forms Service for rich and fillable online forms

Business Connectivity Services

(

BCS

) for integrated backend data to SharePoint

SharePoint add-ins (formerly apps)

In marketing terms, OneDrive for Business is a separate service, but it shares a lot of the same thinking, vision, and in some parts, APIs with SharePoint Online.

Depending on who is accessing SharePoint Online, it can act as a simple team site offering a common storage for documents (typically Office files, such as Word and Excel documents), a messaging board, a blog, and a place to store organizational data such as software licensing information or employee contact information.

SharePoint Online supports accessing content through a web interface, through Office clients and APIs. In some scenarios, content can be accessed through a mapped network drive using WebDAV but this is more or less a legacy way of accessing documents and files stored in SharePoint.

In the following sections, we'll walk you through the essential concepts of SharePoint Online, on a level that we feel is relevant for any developer aiming to work with SharePoint Online.

SharePoint sites and site collections

Each SharePoint site is a separate place for storing content. Each site belongs to not more than one site collection. Think of SharePoint sites as folders, and site collections as a drive letter or hard drive partitions. The analogy is slightly lacking, but for now, it's sufficient for relaying the essential concepts of SharePoint Online.

Organizations create one or more site collections and use site collections typically as security boundaries. One site collection could be the intranet, another could be an extranet for specific partner companies or customers. A third one could act as the Board of Directors' secure site collection for storing highly sensitive documents. Each site collection can hold one or more sites, but they always have one site, which will be the root site of a given site collection.

Sites are the common building block for SharePoint Online services, such as intranet and extranet. You could build a very nice intranet using just one site collection, and then using just one site within the site collection. In the real world, however, you would typically need to structure your content and data among multiple sites, and possibly multiple site collections.

In the following illustration, you can see a high-level overview of what SharePoint Online is. On the left-most side, you see site collections, which are made up of sites and possible subsites. Each site can then hold relevant configuration data and SharePoint artefacts such as document libraries and lists.

SharePoint document libraries

SharePoint sites store information, which requires different types of containers. One type of container is a document library. A document library can be used to store files, including Office documents, text files, media files, and similar content. Most SharePoint sites have, by default, one or more document libraries provisioned and you are free to create more as needed.

Document libraries can either have a modern user experience or a classic user experience. This is due to the changes Microsoft is rolling out over several months (or sometimes even years), which in turn allows for customers to decide when to deploy new and drastic changes, such as a new user experience for something as central as a document library.

The modern user experience is fully responsive and has a fresh look. All essential tooling is available in a simple toolbar and the ribbon interface from the Office 2007/2010 era is gone:

The classic experience is still very much in use; it is supported and, in certain scenarios, works better. This holds especially true for situations where users have used SharePoint Online for several years and are very accustomed to the classic experience:

Both views relay almost identical information, but the classic experience also exposes the ribbon UI, which in turns hides (or shows, depending on context) a lot of additional tooling:

One of the challenges for developers with the ribbon UI has always been the cumbersome approach to modifying, hiding, or adding custom buttons in the ribbon. While it's possible, it's certainly not a task customers would request initially. Users are familiar with the default buttons, and changing or disabling essential buttons for something else will most certainly confuse users.

Each document in a document library holds metadata. Metadata is a larger topic, and not in the scope of this book, suffice to say that metadata in SharePoint Online document libraries is used to reveal and store information about files, and data in general. Metadata can be used to search files and different views on data can be shown, based on metadata filtering, sorting, and selections.

The classic view for modifying metadata is very bare bones but also easy to use:

The modern view for modifying metadata is more modern, but might involve a little learning curve for users accustomed to the classic view:

Notice how metadata in the modern view is shown upon selection of a file, while in the classic view the view is completely different and the context of other files is hidden.

SharePoint lists

Besides document libraries, SharePoint sites can hold lists. Technically, lists are identical to document libraries but rather than storing binary files, they store other data such as text, numbers, selections, or even attachment files. Lists are typically used to create ad-hoc data structures to hold data that can be sorted, filtered, and queried. Document libraries often act as a file store and lists act as a data or information store without really storing physical files.

While document libraries are just that: document libraries, lists come in all sizes and varieties. The common base list is a custom list, which is essentially an empty list with just a few data columns as a template. Other list templates include contact lists (predefined person data columns), links (URLs and descriptive text columns), and announcements (news-style items with headlines and summary text), to mention a few:

By creating a custom list you can easily build a data store for any kind of data your application might require at a later time. The list can be queried similarly to how you would query a relational database table. It's a graphical representation of an SQL table, with the addition of built-in functionality such as graphical views, sorting, filtering, and integration to other Office 365 services.

By adding new columns (metadata) to a list, you effectively provide additional ways to store data. The Title column is the base column, which you can later rename if you choose to.

To add a new column, simply define the datatype and other properties and it will automatically be added to the default view:

When you add a new column of the datatype Multiple lines of text, you effectively create a new text box that can be filled out when adding a new line to your custom list:

This data can now be saved and is immediately visible and accessible on the list:

It's crucial to understand that you have a built-in, scalable, secure, and ready-to-use platform for storing data within SharePoint lists and document libraries. Instead of always designing, provisioning, and maintaining a separate SQL database with custom-created tables, you can always provision your application's data to a SharePoint list or library, depending on which works best for you.

SharePoint web parts

Web parts are the building blocks for SharePoint pages. Pages sit in a document library and provide a graphical view that can be customized or hand-built depending on need.

Each document library and list, upon provisioning, create a web part representation of itself that can be embedded on a SharePoint page. As such, web parts are an easy way to create a clickable portal page to quickly access document libraries and lists or for simply resurfacing information from within SharePoint structures.

There are also a few dozen pre-created web parts that provide additional functionality, such as embedding comments on a page or retrieving an RSS feed and rendering a nice formatted list out of the feed items. Developers often create custom web parts that do the kind of actions that default web parts lack. This could include custom buttons, views, fields, and using data stored within SharePoint and providing a nicer interface for modifying said data.

By editing a SharePoint page, users can rearrange existing web parts on a page or add new ones and remove existing ones:

Adding a web part by editing the page and then selecting Insert | Web Part provides a list of all supported and installed web parts on the service.

The interface is a bit retro in the sense that it involves a lot of dragging, dropping, and popup menus to finalize the web part settings:

When editing a web part, the WEB PART tool pane (on the right) becomes visible, allowing manipulation of the Web Part Properties. This includes the title text and possible parameters to instruct the web part to act differently.

Why SharePoint Online?

So far, we've taken a whirlwind tour of SharePoint Online, barely scratching the surface of the default functionality within a SharePoint site. Considering the first version of SharePoint was introduced in 2001, a lot of has evolved since then. But at the same a lot has surprisingly stayed the same: document libraries, lists, and sites more or less share the same concepts as they did over 15 years ago.

Today, companies choose SharePoint Online for several reasons. In our opinion, the three main reasons companies choose SharePoint Online are:

Compatibility and cooperation with Office suite applications, including cross-platform support on macOS and Office Online browser users

A readily available intranet and extranet platform that works with single sign-on (using Azure Active Directory as the identity provider)

It works natively with Exchange, Skype for Business, and OneDrive for Business, which are the default choices of productivity tools for many organizations

Most probably the development aspects of SharePoint Online are not the primary reason for companies to choose SharePoint Online. Interoperability, common standards, and well-documented APIs are critical, but often not the main driver for choosing SharePoint Online to start with.

Microsoft claims* that over 90 percent of Fortune 500 users are using Microsoft's cloud services; this, of course, includes both Microsoft Azure and Office 365. While the claim is very impressive, it does not mean that all 90 percent of Fortune 500 companies are solely using Office 365 and/or Microsoft Azure; they might be using Amazon's AWS or any number of other hosting or public cloud offerings available, together with Office 365. The reality, though, is that over 100 million users are accessing Office 365 workloads every month. This is an amazing number of users who have enrolled to a paid license and are actively using any number of the multiple services Office 365 has to offer. As such, development for SharePoint Online is something that is in demand from both small and large organizations and enterprises, as well ISVs who need to implement their own products to fit with Office 365.

* Microsoft 2017 earnings call; see https://www.microsoft.com/en-us/Investor/earnings/FY-2017-Q3/press-release-webcast.

Another reason that organizations choose SharePoint Online is that they might already be paying for it. When they initially purchased a license for Office 365 to maybe use Exchange Online for their emails, they typically also purchased a SharePoint Online license for users. Nowadays this includes 1 terabyte of storage to hold all SharePoint Online content, as well as the majority of SharePoint Online functionality. Comparing this free offering to an on-premises SharePoint 2013 or SharePoint 2016 deployment often means that SPO becomes a compelling option. While the on-premises deployment of SharePoint typically requires at least 3-6 months for full installation, roll-out for users, customization, configuration, and managing--the equivalent in Office 365-SharePoint Online is already there and ready to use. This is not to say that SharePoint Online and SharePoint on-premises are identical; however, they do share more or less the same set of features that most users tend to need.

Office 365 licensing