Book Image

SharePoint Development with the SharePoint Framework

By : Jussi Roine, Olli Jääskeläinen
Book Image

SharePoint Development with the SharePoint Framework

By: Jussi Roine, Olli Jääskeläinen

Overview of this book

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.
Table of Contents (14 chapters)

Accessing SharePoint Online with CSOM using a console app

Before we construct our calls directly to the REST APIs SharePoint exposes, let's do a quick exercise using the traditional CSOM approach. This is part of the SDK, and depending on your usage, it will access SharePoint through the SOAP-based Web Services, such as sites.asmx that resides in /_vti_bin/sites.asmx.

Let's try creating a simple console application first to see how things were working until now:

  1. Open Visual Studio 2015/2017 and create a new project from File | New | Project...:
  1. Select a Console App from the list of available templates, as follows:
  1. Name the app as you like, and click OK.
  2. If you choose C# as the programming language, a Program.cs open with a skeleton class. You'll need to get the SharePoint Online Client Components SDK first; to do it, click on Tools |NuGet Package Manager | Package Manager Console:
  1. The Package Manager Console opens in a separate window; by default, it opens in...