0%

Book Description

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.

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased 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 code file.

Table of Contents

  1. Preface
    1. What this book covers
    2. What you need for this book
    3. Who this book is for
    4. Conventions
    5. Reader feedback
    6. Customer support
      1. Downloading the example code
      2. Errata
      3. Piracy
      4. Questions
  2. Introducing SharePoint Online for Developers
    1. What is SharePoint Online?
      1. SharePoint sites and site collections
      2. SharePoint document libraries
      3. SharePoint lists
      4. SharePoint web parts
    2. Why SharePoint Online?
    3. Office 365 licensing
      1. Choosing an Office 365 license for development use
    4. Getting started with SharePoint Online
      1. Creating new site collections
        1. A word or two on SharePoint site templates
          1. Site definitions
          2. Site templates
          3. Web templates
          4. SharePoint Online and site templates
        2. Creating a new site collection
      2. Developer sites versus team sites
      3. SharePoint Online APIs
        1. A quick primer on Microsoft Graph
    5. Developing solutions for SharePoint Online
      1. Solutions for SharePoint and SharePoint Online
        1. SharePoint 2001-2003: direct modification of files
        2. SharePoint 2007--Full-trust code
        3. SharePoint 2010 and SharePoint Online: sandbox solutions
        4. SharePoint 2013, SharePoint 2016, and SharePoint Online: add-ins
        5. SharePoint Online--add-ins and client-side scripts
      2. Development tooling for SharePoint Online
    6. Summary
  3. Developing Solutions for SharePoint
    1. Introducing the SharePoint Framework
      1. SharePoint extensibility
      2. Philosophy of the SharePoint Framework
      3. Types of projects the SharePoint Framework supports
      4. Key features of the SharePoint Framework
    2. Toolchain
      1. npm
      2. Yeoman and Yeoman SharePoint generator
      3. Gulp
      4. Visual Studio Code
      5. Browser developer tools
      6. SharePoint Workbench
    3. Introducing Office Developer Patterns and Practices
      1. Office Developer Patterns and Practices in practice
      2. Contributing to Office Dev PnP
    4. Application life cycle management with SharePoint customizations
      1. Managing and versioning source code and assets
        1. GitHub
        2. Visual Studio Team Services
        3. Deploying, retracting, and managing solutions
    5. Summary
  4. Getting Started with the SharePoint Framework
    1. Setting up your development environment
      1. Step 1 - Installing Node.js
      2. Step 2 - Node package manager
      3. Step 3 - Installing Yeoman and Gulp
      4. Step 4 - Installing the Yeoman SharePoint generator
      5. Step 5 - Install Visual Studio Code
    2. Testing your SharePoint Framework development environment
      1. Step 1 - Creating a folder for the web part
      2. Step 2 - Running the Yeoman SharePoint generator
      3. Step 3 - Installing the developer certificate
      4. Step 4 - Running the web part on a local workbench
    3. Anatomy of the SharePoint Framework web part project
      1. Main folders and root level configuration files
      2. TypeScript basics in the SharePoint Framework
      3. Key files of the SharePoint Framework web part projects
    4. Summary
  5. Building Your First Web Part
    1. Creating a feedback list
    2. Creating the feedback web part project
    3. Setting web part basics
    4. Building feedback web part user experience
      1. Testing the user interface
    5. Saving the feedback
      1. Testing and troubleshooting the web part
    6. Ideas for fine tuning the web part for production use
      1. Using Office 365 to build better business process
      2. Building smarter controls
      3. Provisioning of the Feedback list and other resources
      4. Localization
        1. Localizing web part manifest
        2. Localizing texts
        3. Calendar and currency
    7. Summary
  6. Using Visual Studio Code and Other Editors
    1. Introducing Visual Studio Code
    2. Installing Visual Studio Code
    3. Getting to know Visual Studio Code
      1. Changing the color theme
      2. Working with files
    4. Extensions
    5. Working with the SharePoint Framework in Visual Studio Code
      1. Running commands with the Integrated Terminal
    6. Using Visual Studio instead of Visual Studio Code
    7. Summary
  7. Packaging and Deploying Solutions
    1. Overview of packaging and deploying
    2. Packaging SharePoint Framework solutions
      1. Using Gulp to package a project
    3. Deploying SharePoint Framework solutions
      1. App Catalog
      2. Installing the app
      3. Deploying assets
        1. SharePoint Online CDN and Microsoft Azure CDN
        2. Configuring a SharePoint Online CDN
        3. Updating the project to support a SharePoint Online CDN
        4. Deploying assets to a SharePoint Online CDN
        5. Configuring Microsoft Azure Storage CDN
        6. Updating the project to support Microsoft Azure CDN
        7. Deploying assets to Microsoft Azure CDN
    4. Summary
  8. Working with SharePoint Content
    1. Overview of working with SharePoint content
    2. Using mock data
      1. Using mock data with locally hosted SharePoint Workbench
        1. Step 1 - create data model
        2. Step 2 - create MockSharePointClient
        3. Step 3 - consume the mock data in the web part
    3. Accessing real data with SPHttpClient
      1. Working with SharePoint lists
        1. Requesting the list of lists with SPHttpClient
        2. Checking if the list exists and creating lists
      2. Working with SharePoint list items
        1. Creating an Office 365 Group and new SharePoint list
        2. Basic operation with SharePoint list items using SPHttpClient
          1. Step 1 - create a hello-listitems web part project
          2. Step 2 - add a data model for list items
          3. Step 3 - build the user interface for the web part
          4. Step 4 - define the function that will make SPHttpClient request to read list items and test the web part
          5. Step 5 - implementing the _runOperation function and building a skeleton for CRUD operation functions
          6. Step 6 - implementing the create operation
          7. Step 7 - implementing the read operation
          8. Step 8 - implementing the update operation
          9. Step 9 - implementing the delete operation
    4. Summary
  9. Working with the Web Part Property Pane
    1. Web part property pane
      1. Property panes in classic web parts
      2. Property panes in SharePoint Framework web parts
    2. Implementing a property pane
      1. Fields in property panes
      2. Implementing headers, groups, and fields
      3. Implementing multiple pages in property panes
      4. Handling property field events
    3. Implementing custom properties in a property pane
      1. Defining a custom field type
    4. Summary
  10. Using React and Office UI Fabric React Components
    1. Overview
    2. Understanding React
      1. React is declarative
      2. React is component-based
    3. Introduction to Fabric React components
      1. Fabric React support
      2. How to obtain Fabric React for your web part
      3. Using Fabric React components
        1. Button
        2. Dialog
        3. TextField
    4. Using React and Office UI Fabric React components in SharePoint Framework web parts
      1. Creating the SharePoint Framework React To-do web part
      2. Step 1 - Creating a React web part project
      3. Step 2 - Adding Office UI Fabric React to the project
      4. Step 3 - Examining the React project structure
      5. Step 4 - Creating the ITodoItem interface and mockup data
      6. Step 5 - Implementing a to-do list in React and Fabric React components
        1. Modifying the web part file
        2. Modifying the ReactTodo component
        3. Creating TodoItemComponent
    5. Summary
  11. Working with Other JavaScript Frameworks
    1. Overview
    2. Using jQuery in SharePoint framework web parts
      1. Loading jQuery from CDN
      2. Bundling jQuery to the web part package
    3. Knockout
    4. AngularJS and Angular
    5. Using SharePoint patterns and practices JavaScript Core Library
      1. Accessing user profiles
      2. Sending email
      3. Working with lists and list items
    6. Working with JavaScript libraries
    7. Additional considerations
    8. Summary
  12. Troubleshooting and Debugging SharePoint Framework Solutions
    1. Troubleshooting
      1. Ensuring an up-to-date npm
      2. Updating the Yeoman template version
      3. Troubleshooting the npm cache
    2. Optimization
      1. Optimizing the SharePoint Framework packages
      2. Loading external packages
    3. Debugging solutions
      1. Debugger statements using browser developer tools
      2. Debugging with source maps
      3. Debugging in Visual Studio Code
    4. Summary
  13. SharePoint APIs and Microsoft Graph
    1. SharePoint APIs
      1. SharePoint REST APIs
        1. Accessing SharePoint Online with CSOM using a console app
        2. Accessing SharePoint Online with REST using a console app
        3. Accessing REST APIs with SharePoint Framework
    2. Microsoft Graph
      1. What is Microsoft Graph?
      2. Accessing Microsoft Graph with Graph Explorer
      3. Accessing Microsoft Graph with SharePoint Framework
    3. Summary
  14. The Future of SharePoint Customizations
    1. The future of SharePoint developers
    2. Our recommendations for developers
    3. The SharePoint Framework support in SharePoint 2016
    4. Is SharePoint Framework the final framework for SharePoint developers?
    5. Summary
18.218.184.214