SlideShare a Scribd company logo
Pennsylvania Edition
Microsoft – Malvern, PA
Bootcamp Outline
 Session 1
 Getting Started
 O365 Developer Program
 Tenant Setup
 Client Setup
 Intro to SPFx
 Session 2
 Building You First Web Part
 Scaffolding
 Building
 Deployment
 Pulling Data from SharePoint
 Intro to PnP-JS
 Intro to PnP-JS
 Session 3
 Intro to React
 Rebuild Part Using React
 Intro to Office UI Fabric
 Text Box
 Button
 Creating New Items via PnP
 Session 4
 SPFx in Teams
 Building a Package for Teams
 Creating Teams Tab
Organizers
Thomas Daly
Office Servers & Services MVP
O365 UG + SPSNYC
SoHo Dragon
Team Lead
thomasd@sohodragon.com
@_tomdaly_
Manpreet Singh
Office Servers & Services MVP
C# Corner MVP
SPSPhilly
SharePoint Consultant
manpreetletterbox@hotmail.com
Jason Rivera
Tri-State Office 365 UG + SPSPhilly
Anexinet
Solution Architect
jrivera@anexinet.com
@SharePointJR
Need Assistance?
 Microsoft Partner
 Inc 5000 [3 years]
 What We Do
 Digital Workspace
 Cloud Services [Azure/AWS]
 Managed Services
 Data & Analytics
 Quality Assurance
 Development
 Staffing / Recruitment
https://www.anexinet.com/
Session 1
Getting Started - Setting up Tenant / Environment
Bootcamp Outline
 Session 1
 Getting Started
 O365 Developer Program
 Tenant Setup
 Client Setup
 Intro to SPFx
 Session 2
 Building You First Web Part
 Scaffolding
 Building
 Deployment
 Pulling Data from SharePoint
 Intro to PnP-JS
 Intro to PnP-JS
 Session 3
 Intro to React
 Rebuild Part Using React
 Intro to Office UI Fabric
 Text Box
 Button
 Creating New Items via PnP
 Session 4
 SPFx in Teams
 Building a Package for Teams
 Creating Teams Tab
Office 365 Developer Subscription
 Sign up – Online, FREE [Required Live Account]
 https://developer.microsoft.com/en-us/office/dev-program
 Starting in April 2019, we offer renewable 90-day subscriptions
 What's included in the developer subscription?
 Office 365 E3 – 25 User License
 SharePoint, Teams …. everything else
Office 365 Tenant Setup
Create App Catalog Site
 Go to the Classic SharePoint Admin Center by entering the following URL in your browser.
Replace yourtenantprefix with your Office 365 tenant prefix.
 https://yourtenantprefix-admin.sharepoint.com
 In the left sidebar, select the Classic Features > apps menu item, and then select app catalog.
 Select OK to create a new app catalog site.
 On the next page, enter the following details:
 Title: Enter app catalog.
 Web Site Address suffix: Enter your preferred suffix for the app catalog; for example: apps.
 Administrator: Enter your username, and then select the resolve button to resolve the username.
 Select OK to create the app catalog site.
 SharePoint creates the app catalog site, and you are able to see its progress in the SharePoint admin
center.
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer-
tenant#to-create-an-app-catalog-site
Create Test Site Collection
 Go to the SharePoint Admin Center by entering the following URL in your browser.
Replace yourtenantprefix with your Office 365 tenant prefix.
 https://yourtenantprefix-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx
 In the left sidebar, select Sites > Active Sites.
 In the toolbar, select Create.
 In the Create a site dialog, select Communication Site.
 In the panel that appears, enter the following details:
 Choose a design: choose blank.
 Site name: Enter a title for your site; for example: Test Site.
 Site owner: Specify the name / email address of the site owner.
 Select Finish to create the site collection.
Using Existing Tenant?
 Don’t want to pollute global app catalog
 We can do site collection based app catalog to isolate your developments
$site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing
Add-SPOSiteCollectionAppCatalog -Site $site
 See Team Member for assistance
 https://docs.microsoft.com/en-us/sharepoint/dev/general-development/site-collection-app-catalog
Development Environment
Software / Tooling
 Install NodeJS
 Install NodeJS LTS version 10
 Install a code editor
 Visual Studio Code
 Install Yeoman and gulp
 npm install -g yo gulp
 Install Yeoman SharePoint generator
 npm install -g @microsoft/generator-
sharepoint
 Trusting the self-signed developer certificate
 Do this after creating your first project
 gulp trust-dev-cert
 Install Google Chrome
 optional but recommended
 Extensions
 SP Editor
 React Developer Tools
 Internet Explorer 11
 Not Good for Web Development
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-
environment
Intro to SPFx
SharePoint Framework (SPFx)
 Page / Web Part model that provides full support for client-side SharePoint development
 Easy integration with SharePoint data
 Support for Open Source tooling
 “The” customization model for Office 365
 Support for SharePoint 2016 Feature Pack 2, SharePoint 2019, & Office 365
Key Features
 It runs in the context of the current user and connection in the browser.
 NO iframes(JavaScript is embedded directly to the page).
 The controls are rendered in the normal page DOM.
 It is framework-agnostic. You can use any JavaScript framework that you like: React, Handlebars,
Knockout, Angular, and more.
 The toolchain is based on common open source client development tools such as npm,
TypeScript, Yeoman, webpack, and gulp.
 End users can use SPFx client-side solutions that are approved by the tenant administrators (or
their delegates) on all sites, including self-service team, group, or personal sites.
 SPFx web parts can be added to both classic and modern pages.
M365 global developer bootcamp 2019  PA
Session 2
First Look at SPFx - Building your first web part, talking to SharePoint via REST & PnP-JS
Bootcamp Outline
 Session 1
 Getting Started
 O365 Developer Program
 Tenant Setup
 Client Setup
 Intro to SPFx
 Session 2
 Building You First Web Part
 Scaffolding
 Building
 Deployment
 Pulling Data from SharePoint
 Intro to PnP-JS
 Intro to PnP-JS
 Part 3
 Intro to React
 Rebuild Part 2 using React
 Intro to Office UI Fabric
 Text Box
 Button
 Creating New Items via PnP
 Part 4
 SPFx in Teams
 Building a Package for Teams
 Creating Teams Tab
Building Your First Web Part
Create Web Part Project
 Create a new project directory in your favorite location.
 md helloworld-webpart
 Go to the project directory.
 cd helloworld-webpart
 Create a new HelloWorld web part by running the Yeoman SharePoint Generator.
 yo @microsoft/sharepoint
Create Web Part Project (cont)
 When prompted:
 Accept the default helloworld-webpart as your solution name, and then select Enter.
 Select SharePoint Online only (latest), and select Enter.
 Select Use the current folder for where to place the files.
 Select N to allow the solution to be deployed to all sites immediately.
 Select N on the question if solution contains unique permissions.
 Select WebPart as the client-side component type to be created.
Create Web Part Project (cont)
 The next set of prompts ask for
specific information about your web
part:
 Accept the default HelloWorld as
your web part name, and then
select Enter.
 Accept the default HelloWorld
description as your web part
description, and then select Enter.
 Accept the default No JavaScript
web framework as the framework
you would like to use, and then
select Enter.1
Create Web Part Project (cont)
 At this point, Yeoman installs the
required dependencies and
scaffolds the solution files along
with the HelloWorld web part. This
might take a few minutes.
 When the scaffold is complete, you
should see the following message
indicating a successful scaffold.
Preview the web part
 Enter the following command in the
console to open VS Code:
 code .
 Enter the following to open the
Terminal in VS Code
 CTRL + `
 Enter the following command in the
terminal to build and preview your
web part:
 gulp serve
What is Happening?
 SharePoint client-side development tools use gulp as the task runner to handle build process
tasks such as:
 Bundling and minifying JavaScript and CSS files.
 Running tools to call the bundling and minification tasks before each build.
 Compiling SASS files to CSS.
 Compiling TypeScript files to JavaScript.
SharePoint Workbench
 Developer design
surface that enables
you to quickly preview
and test web parts
without deploying them
in SharePoint.
Add Your Web Part
 To add the HelloWorld web part, select the add icon (this icon
appears when you mouse hovers over a section as shown in the
previous image).
 This opens the toolbox where you can see a list of web parts
available for you to add. The list includes the HelloWorld web
part as well other web parts available locally in your
development environment.
Add Your Web Part (cont)
 Select HelloWorld to add the web
part to the page.
Congratulations
You have successfully deployed your first SPFx web part
Deploying to SharePoint
Packaging the Web Part
 If gulp serve is still running, stop it from running by hitting, ctrl + C
 In the console window, enter the following command to package your client-side solution that
contains the web part:
 gulp clean
 gulp build --ship
 gulp bundle --ship
 gulp package-solution –-ship
For dev builds you don’t need the –ship but then you must be running gulp serve
Simple Build Script for the SharePoint Framework
Deploy to App Catalog
 Go to your site's app catalog.
 Upload or drag and drop
the helloworld-webpart.sppkg to
the app catalog.
Deploy to App Catalog (cont)
 This deploys the client-side
solution package. Because this is
a full trust client-side solution,
SharePoint displays a dialog and
asks you to trust the client-side
solution to deploy.
 Select Deploy.
 Notice that you can see if there's
any exceptions or issues in the
package by looking the App
Package Error Message column in
the app catalog.
Add to SharePoint Site
Install App in Site
 Go to your developer site
collection or site collection
which you want to use for
testing
 Select the gears icon on the
top nav bar on the right, and
then select Add an app to go
to your Apps page.
 In the Search box,
enter helloworld, and select
Enter to filter your apps.
Install App in Site (cont)
 Select the helloworld-
webpart-client-side-
solution app to install the
app on the site.
 The client-side solution
and the web part are
installed on your
developer site.
Add Web Part to Modern Page
 In your browser, go to your site
where the solution was just
installed.
 Select the gears icon in the top
nav bar on the right, and then
select Add a page.
 Edit the page.
 Open the web part picker and
select your HelloWorld web
part.
Congratulations
You have successfully deployed your first SPFx web part
Communicating with SharePoint
Create a Custom List
 Navigate to your site
 Gear > Add an app > Custom List
 Name: Test
 Make at least 2 items
Live Development
 Enter the following command in the console to build and
preview your web part:
 gulp serve
 On the Page with the webpart add the following to the end of
the url
 ?loadSPFX=true&debugManifestsFile=https://localhost
:4321/temp/manifests.js
 BONUS: use SP-Editor [Chrome Extension] to load debug url
Modify Code / Verify Connection
Refresh the Browser
Import spHttpClient
Scroll to the top of the HelloWorldWebPart.ts file
Update DOM in Render Function
Add Get List Items Function in Render
Add Get List Items Function
Add Render List Items Function
Refresh the Browser
Congratulations
You have successfully communicated with SharePoint list data
Intro to PnP-JS
What is PnP-JS?
 PnP-JS is a collection of fluent
libraries for consuming SharePoint,
Graph, and Office 365 REST APIs in
a type-safe way.
 Benefits:
 Intellisense
 Typing
 Asynchronous
 Caching
 Clear Code Intent
 Abstraction
 Open Source
Getting Started
 Install
 npm install
@pnp/logging
@pnp/common
@pnp/odata @pnp/sp
@pnp/graph --save
 Establish Context
 See Right Image
Stop any running gulp serve before installing
Import SP Library
Add Get List Items Function via PnP-JS
Replace Get List Items Call
Refresh the Browser
Congratulations
You have successfully communicated with SharePoint list data via PnP-JS
Session 3
Intro to React & Office UI Fabric
Bootcamp Outline
 Session 1
 Getting Started
 O365 Developer Program
 Tenant Setup
 Client Setup
 Intro to SPFx
 Session 2
 Building You First Web Part
 Scaffolding
 Building
 Deployment
 Pulling Data from SharePoint
 Intro to PnP-JS
 Intro to PnP-JS
 Session 3
 Intro to React
 Rebuild Part 2 using React
 Intro to Office UI Fabric
 Text Box
 Button
 Creating New Items via PnP
 Session 4
 SPFx in Teams
 Building a Package for Teams
 Creating Teams Tab
Intro to React
What is React?
 JavaScript library for building user interfaces
 At a minimum, know this:
 Components: These are the building blocks of your app. You want to make them as modular as possible.
 State: internal data, that when changed caused the UI to re-render. You own this data.
 Props: data / functions, passed to a component. You don’t own this data.
 Life Cycle Methods: functions that do things at certain points
Building Your First React
Web Part
Create React Web Part Project
 Create a new project directory in your favorite location.
 md helloworld-webpart-2
 Go to the project directory.
 cd helloworld-webpart-2
 Create a new HelloWorld web part by running the Yeoman SharePoint Generator.
 yo @microsoft/sharepoint
Create Web Part Project (cont)
 When prompted:
 Accept the default helloworld-webpart-2 as your solution name, and then select Enter.
 Select SharePoint Online only (latest), and select Enter.
 Select Use the current folder for where to place the files.
 Select N to allow the solution to be deployed to all sites immediately.
 Select N on the question if solution contains unique permissions.
 Select WebPart as the client-side component type to be created.
Create Web Part Project (cont)
 The next set of prompts ask for
specific information about your web
part:
 Accept the default HelloWorld as
your web part name, and then
select Enter.
 Accept the default HelloWorld
description as your web part
description, and then select Enter.
 Select React as the framework
you would like to use, and then
select Enter.1
Open with Visual Studio Code
 Type the following command:
 code .
 Use the VS Code console to run
gulp commands
Create Web Part Project (cont)
 At this point, Yeoman installs the
required dependencies and
scaffolds the solution files along
with the HelloWorld web part. This
might take a few minutes.
 When the scaffold is complete, you
should see the following message
indicating a successful scaffold.
Next Steps
 Open VS Code
 Build / Bundle / Package
 Deploy to SharePoint App Catalog
 Add App to SharePoint Site
 Add to Page
Add PnP-JS to Project
 Install
 npm install
@pnp/logging
@pnp/common
@pnp/odata @pnp/sp
@pnp/graph --save
 Establish Context in
HelloWorldWebPart.ts
 See Right Image
Add State Interface Definition
Import State, Use Constructor to Initialize
Import PnP-JS & Add State Interface
Add Get Items via PnP
Add Life Cycle Method
Update Render
Expected Output
Congratulations
You have successfully created a React Web Part with PnP-JS
Intro to Office UI Fabric
The Design Language of Microsoft Products
What is the Office UI Fabric?
 Microsoft’s UX Framework to create seamless experiences in Microsoft
products
 Two Flavors Available
 Fabric React – open-source React front-end framework designed to build
experiences that fit seamlessly into a broad range of Microsoft products.
 Fabric Core – open-source collection of CSS classes and Sass mixins that give you
access to Fabric's colors, animations, fonts, icons and grid.
Think of it as a bunch of styles and a bunch of controls… similar to bootstrap
Styles - Example
Component Example - Button
Component Example - TextField
Building a Feedback Web Part
Let’s combine everything we’ve learned!
Add Office UI Fabric to Project
Let’s Add a Button
Import Button Component
Add Button Component
Create OnClick Function for Button Component
Add OnClick Event to Button Component
Let’s Add a Text Field
Import TextField Component
Add TextField Component
Add TextField State Variable on Interface
Initialize TextField State Variable in Component State
Connect OnChange Function to TextField
Create OnChange Function for TextField
Add State Value to TextField Component
Create Add New List Items via PnP Function
Update Get List Items Add OrderBy & Top
Refactor Component Will Mount
Update Render
Wire Button to Submit New Item, then Get New Items
Results
List Data in SharePoint
Congratulations
You have successfully created a Feedback Web using React, Office UI Fabric & PnP-JS
Session 4
Building SPFx Solutions for Tabs within Teams
Bootcamp Outline
 Session 1
 Getting Started
 O365 Developer Program
 Tenant Setup
 Client Setup
 Intro to SPFx
 Session 2
 Building You First Web Part
 Scaffolding
 Building
 Deployment
 Pulling Data from SharePoint
 Intro to PnP-JS
 Intro to PnP-JS
 Session 3
 Intro to React
 Rebuild Part 2 using React
 Intro to Office UI Fabric
 Text Box
 Button
 Creating New Items via PnP
 Session 4
 SPFx in Teams
 Building a Package for Teams
 Creating Teams Tab
Project Architecture
Teams Folder
 Starting with the SharePoint Framework v1.8, scaffolding
will also include additional ./teams folder
 Teams folder contains the following two files:
 [componentId]_color.png - Default small picture for a
tab
 [componentId]_outline.png - Default large picture for
a tab
 These images will be used as icons in Microsoft Teams.
 Teams Manifest – Defines the app, by default not there
SharePoint will create it for you!@
 https://docs.microsoft.com/en-
us/sharepoint/dev/spfx/web-parts/get-started/using-
web-part-as-ms-teams-tab
Update Web Part Manifest
Import Microsoft Teams – HelloWorldWebPart.ts
Add Teams Context Code
Add Team Context Prop
Pass Teams Context Prop
Update Render to Show Different Context
Set to Tenant Wide Deployment
Rebuild
 If gulp serve is still running, stop it from running by hitting, ctrl + C
 In the console window, enter the following command to package your client-side solution that
contains the web part:
 gulp clean
 gulp build --ship
 gulp bundle --ship
 gulp package-solution –-ship
Simple Build Script for the SharePoint Framework
Update Package in
App Catalog
Upload or Drag and Drop .SPPKG in to the
App Catalog
Sync to Teams
In Team Channel, Add a Tab
Add App
No Config, Save
SPFx Teams Tab
Congratulations
You have successfully created a Feedback Web using React, Office UI Fabric & PnP-JS
Thanks For
Attending
 Must Fill In – Event Survey!!!
 https://aka.ms/Microsoft365DevB
ootcampSurvey2019
Voitanos On-Demand Training
 The best SPFx training resource – hands down,
always updated, on demand.
 ~$750 for the Ultimate Package. Worth It!
 Taught by Andrew Connell, 15+ year MVP in
SharePoint / Office 365
“Understanding the SPFx Dev Toolchain”
email course [FREE]
Mastering the SharePoint Framework On
Demand http://bit.ly/m365-pa-2
http://bit.ly/m365-pa-free
Need Assistance?
 Microsoft Partner
 Inc 5000 [3 years]
 What We Do
 Digital Workspace
 Cloud Services [Azure/AWS]
 Managed Services
 Data & Analytics
 Quality Assurance
 Development
 Staffing / Recruitment
https://www.anexinet.com/
Reach Out
Thomas Daly
Office Servers & Services MVP
O365 UG + SPSNYC
SoHo Dragon
Team Lead
thomasd@sohodragon.com
@_tomdaly_
Manpreet Singh
Office Servers & Services MVP
C# Corner MVP
SPSPhilly
SharePoint Consultant
manpreetletterbox@hotmail.com
Jason Rivera
Tri-State Office 365 UG + SPSPhilly
Anexinet
Solution Architect
jrivera@anexinet.com
@SharePointJR
Resources
All Content comes from the
Official Microsoft Documentation
Code / Cheat Sheets - Part 2, 3
& 4 – all on github
https://github.com/tom-
daly/demos/tree/master/m365-
bootcamp
Slides
https://1drv.ms/p/s!AmWInMQz
NTOFmIFf3K2PaPvODtykyg?e=9
aVBS8

More Related Content

PPTX
M365 global developer bootcamp 2019
PPTX
M365 global developer bootcamp 2019 Intro to SPFx Version
PDF
Homestead demo
PPTX
Securing api with_o_auth2
PPTX
Github plugin setup in anypointstudio
PPTX
Web application development process
PPTX
Modernizing Twitter for Windows as a Progressive Web App
PPTX
Cloud hub deployment
M365 global developer bootcamp 2019
M365 global developer bootcamp 2019 Intro to SPFx Version
Homestead demo
Securing api with_o_auth2
Github plugin setup in anypointstudio
Web application development process
Modernizing Twitter for Windows as a Progressive Web App
Cloud hub deployment

What's hot (20)

ODP
Domino point2012 integrate domino designer with cvs source control
PDF
Installing the oracle bi mobile app designer
PDF
PPT
N-Tier Application with Windows Forms - Deployment and Security
PPTX
Office Add-ins community call-March 2019
PPTX
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
PDF
Rational Rhapsody Workflow Integration with Visual Studio
PDF
seminar
PPT
Digite - Microsoft Project Integration
PPTX
SPSBE14 SPSBE02 SharePoint Upgrade reel life experience, best practices
PDF
Progressive Web Application by Citytech
PDF
What’s new task due date, active guest users, and more enhancements released
PDF
Cloud and Ubiquitous Computing manual
PDF
Part 1 implementing a simple_web_service
PDF
Angular 7 Firebase5 CRUD Operations with Reactive Forms
PDF
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
PDF
SharePoint Re-branding The VisualStudio Way Part One SandBox Solution
PPTX
Using galen framework for automated cross browser layout testing
DOCX
Tutorial 1
DOC
( 2 ) Office 2007 Create A Portal
Domino point2012 integrate domino designer with cvs source control
Installing the oracle bi mobile app designer
N-Tier Application with Windows Forms - Deployment and Security
Office Add-ins community call-March 2019
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
Rational Rhapsody Workflow Integration with Visual Studio
seminar
Digite - Microsoft Project Integration
SPSBE14 SPSBE02 SharePoint Upgrade reel life experience, best practices
Progressive Web Application by Citytech
What’s new task due date, active guest users, and more enhancements released
Cloud and Ubiquitous Computing manual
Part 1 implementing a simple_web_service
Angular 7 Firebase5 CRUD Operations with Reactive Forms
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
SharePoint Re-branding The VisualStudio Way Part One SandBox Solution
Using galen framework for automated cross browser layout testing
Tutorial 1
( 2 ) Office 2007 Create A Portal
Ad

Similar to M365 global developer bootcamp 2019 PA (20)

PPTX
Introducción al SharePoint Framework SPFx
PDF
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
PDF
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
PPTX
SharePoint Development with the SharePoint Framework
PDF
SPUnite17 Building Great Client Side Web Parts with SPFx
PPTX
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
PPTX
Deep dive into share point framework webparts
PDF
Free Online SharePoint Framework Webinar
PPTX
Biwug 20180410 - I developed a SharePoint Framework solution, what to do next...
PPTX
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
PDF
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
PPTX
VJCD2017 SharePoint Framework (SPFx)
PPTX
OSH01 - Developing SharePoint Framework Solutions for the Enterprise
PPTX
SharePoint Framework 101 (SPFx)
PPTX
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
PPTX
Getting started with spfx
PDF
aOS Monaco - SPFx deployment
PDF
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
PPTX
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
PDF
Real World SharePoint Framework and Azure Services
Introducción al SharePoint Framework SPFx
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
SharePoint Development with the SharePoint Framework
SPUnite17 Building Great Client Side Web Parts with SPFx
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Deep dive into share point framework webparts
Free Online SharePoint Framework Webinar
Biwug 20180410 - I developed a SharePoint Framework solution, what to do next...
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
VJCD2017 SharePoint Framework (SPFx)
OSH01 - Developing SharePoint Framework Solutions for the Enterprise
SharePoint Framework 101 (SPFx)
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
Getting started with spfx
aOS Monaco - SPFx deployment
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Real World SharePoint Framework and Azure Services
Ad

More from Thomas Daly (20)

PPTX
Building a Microsoft Teams Provisioning Process using Power Apps & Power Auto...
PPTX
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
PPTX
New Jersey Azure Bootcamp 2019
PPTX
Cross Site Collection Navigation
PPTX
Learn from my Mistakes - Building Better Solutions in SPFx
PPTX
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
PPTX
O365 Developer Bootcamp NJ 2018 - Material
PDF
Things you can do
PPTX
Global o365 developer bootcamp nj - slides
PPTX
Branding Office 365 w/ Front End Tools + SharePoint PnP
PPTX
Global Office 365 Developer Bootcamp - Closing Remarks
PPTX
Introduction to SharePoint Patterns and Practices (PnP)
PPTX
Intro to the Office UI Fabric
PPTX
Branding office 365 with front end tooling
PPTX
Things you can do to brand Office 365 now
PPTX
Gab2017 science-lab
PPTX
NJ Office 365 User Group March 2017 - Intro
PPTX
Sandboxed Solutions Discussion
PPTX
What Makes SharePoint UX Good?
PPTX
The A to Z of Building a Responsive SharePoint Site with Bootstrap
Building a Microsoft Teams Provisioning Process using Power Apps & Power Auto...
Cross Site Collection Navigation with SPFX, PowerShell PnP, PnP-JS, Office UI
New Jersey Azure Bootcamp 2019
Cross Site Collection Navigation
Learn from my Mistakes - Building Better Solutions in SPFx
Cross Site Collection Navigation using SPFx, Powershell PnP & PnP-JS
O365 Developer Bootcamp NJ 2018 - Material
Things you can do
Global o365 developer bootcamp nj - slides
Branding Office 365 w/ Front End Tools + SharePoint PnP
Global Office 365 Developer Bootcamp - Closing Remarks
Introduction to SharePoint Patterns and Practices (PnP)
Intro to the Office UI Fabric
Branding office 365 with front end tooling
Things you can do to brand Office 365 now
Gab2017 science-lab
NJ Office 365 User Group March 2017 - Intro
Sandboxed Solutions Discussion
What Makes SharePoint UX Good?
The A to Z of Building a Responsive SharePoint Site with Bootstrap

Recently uploaded (20)

PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
DOCX
Unit-3 cyber security network security of internet system
PPTX
innovation process that make everything different.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
WebRTC in SignalWire - troubleshooting media negotiation
PPTX
cyber security Workshop awareness ppt.pptx
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
international classification of diseases ICD-10 review PPT.pptx
PPTX
artificial intelligence overview of it and more
PPTX
Digital Literacy And Online Safety on internet
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
Introduction to Information and Communication Technology
PDF
Sims 4 Historia para lo sims 4 para jugar
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Decoding a Decade: 10 Years of Applied CTI Discipline
522797556-Unit-2-Temperature-measurement-1-1.pptx
Job_Card_System_Styled_lorem_ipsum_.pptx
presentation_pfe-universite-molay-seltan.pptx
Unit-3 cyber security network security of internet system
innovation process that make everything different.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Module 1 - Cyber Law and Ethics 101.pptx
WebRTC in SignalWire - troubleshooting media negotiation
cyber security Workshop awareness ppt.pptx
Introuction about WHO-FIC in ICD-10.pptx
Paper PDF World Game (s) Great Redesign.pdf
international classification of diseases ICD-10 review PPT.pptx
artificial intelligence overview of it and more
Digital Literacy And Online Safety on internet
An introduction to the IFRS (ISSB) Stndards.pdf
Triggering QUIC, presented by Geoff Huston at IETF 123
Introduction to Information and Communication Technology
Sims 4 Historia para lo sims 4 para jugar

M365 global developer bootcamp 2019 PA

  • 2. Bootcamp Outline  Session 1  Getting Started  O365 Developer Program  Tenant Setup  Client Setup  Intro to SPFx  Session 2  Building You First Web Part  Scaffolding  Building  Deployment  Pulling Data from SharePoint  Intro to PnP-JS  Intro to PnP-JS  Session 3  Intro to React  Rebuild Part Using React  Intro to Office UI Fabric  Text Box  Button  Creating New Items via PnP  Session 4  SPFx in Teams  Building a Package for Teams  Creating Teams Tab
  • 3. Organizers Thomas Daly Office Servers & Services MVP O365 UG + SPSNYC SoHo Dragon Team Lead thomasd@sohodragon.com @_tomdaly_ Manpreet Singh Office Servers & Services MVP C# Corner MVP SPSPhilly SharePoint Consultant manpreetletterbox@hotmail.com Jason Rivera Tri-State Office 365 UG + SPSPhilly Anexinet Solution Architect jrivera@anexinet.com @SharePointJR
  • 4. Need Assistance?  Microsoft Partner  Inc 5000 [3 years]  What We Do  Digital Workspace  Cloud Services [Azure/AWS]  Managed Services  Data & Analytics  Quality Assurance  Development  Staffing / Recruitment https://www.anexinet.com/
  • 5. Session 1 Getting Started - Setting up Tenant / Environment
  • 6. Bootcamp Outline  Session 1  Getting Started  O365 Developer Program  Tenant Setup  Client Setup  Intro to SPFx  Session 2  Building You First Web Part  Scaffolding  Building  Deployment  Pulling Data from SharePoint  Intro to PnP-JS  Intro to PnP-JS  Session 3  Intro to React  Rebuild Part Using React  Intro to Office UI Fabric  Text Box  Button  Creating New Items via PnP  Session 4  SPFx in Teams  Building a Package for Teams  Creating Teams Tab
  • 7. Office 365 Developer Subscription  Sign up – Online, FREE [Required Live Account]  https://developer.microsoft.com/en-us/office/dev-program  Starting in April 2019, we offer renewable 90-day subscriptions  What's included in the developer subscription?  Office 365 E3 – 25 User License  SharePoint, Teams …. everything else
  • 9. Create App Catalog Site  Go to the Classic SharePoint Admin Center by entering the following URL in your browser. Replace yourtenantprefix with your Office 365 tenant prefix.  https://yourtenantprefix-admin.sharepoint.com  In the left sidebar, select the Classic Features > apps menu item, and then select app catalog.  Select OK to create a new app catalog site.  On the next page, enter the following details:  Title: Enter app catalog.  Web Site Address suffix: Enter your preferred suffix for the app catalog; for example: apps.  Administrator: Enter your username, and then select the resolve button to resolve the username.  Select OK to create the app catalog site.  SharePoint creates the app catalog site, and you are able to see its progress in the SharePoint admin center. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-developer- tenant#to-create-an-app-catalog-site
  • 10. Create Test Site Collection  Go to the SharePoint Admin Center by entering the following URL in your browser. Replace yourtenantprefix with your Office 365 tenant prefix.  https://yourtenantprefix-admin.sharepoint.com/_layouts/15/online/AdminHome.aspx  In the left sidebar, select Sites > Active Sites.  In the toolbar, select Create.  In the Create a site dialog, select Communication Site.  In the panel that appears, enter the following details:  Choose a design: choose blank.  Site name: Enter a title for your site; for example: Test Site.  Site owner: Specify the name / email address of the site owner.  Select Finish to create the site collection.
  • 11. Using Existing Tenant?  Don’t want to pollute global app catalog  We can do site collection based app catalog to isolate your developments $site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing Add-SPOSiteCollectionAppCatalog -Site $site  See Team Member for assistance  https://docs.microsoft.com/en-us/sharepoint/dev/general-development/site-collection-app-catalog
  • 13. Software / Tooling  Install NodeJS  Install NodeJS LTS version 10  Install a code editor  Visual Studio Code  Install Yeoman and gulp  npm install -g yo gulp  Install Yeoman SharePoint generator  npm install -g @microsoft/generator- sharepoint  Trusting the self-signed developer certificate  Do this after creating your first project  gulp trust-dev-cert  Install Google Chrome  optional but recommended  Extensions  SP Editor  React Developer Tools  Internet Explorer 11  Not Good for Web Development https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development- environment
  • 15. SharePoint Framework (SPFx)  Page / Web Part model that provides full support for client-side SharePoint development  Easy integration with SharePoint data  Support for Open Source tooling  “The” customization model for Office 365  Support for SharePoint 2016 Feature Pack 2, SharePoint 2019, & Office 365
  • 16. Key Features  It runs in the context of the current user and connection in the browser.  NO iframes(JavaScript is embedded directly to the page).  The controls are rendered in the normal page DOM.  It is framework-agnostic. You can use any JavaScript framework that you like: React, Handlebars, Knockout, Angular, and more.  The toolchain is based on common open source client development tools such as npm, TypeScript, Yeoman, webpack, and gulp.  End users can use SPFx client-side solutions that are approved by the tenant administrators (or their delegates) on all sites, including self-service team, group, or personal sites.  SPFx web parts can be added to both classic and modern pages.
  • 18. Session 2 First Look at SPFx - Building your first web part, talking to SharePoint via REST & PnP-JS
  • 19. Bootcamp Outline  Session 1  Getting Started  O365 Developer Program  Tenant Setup  Client Setup  Intro to SPFx  Session 2  Building You First Web Part  Scaffolding  Building  Deployment  Pulling Data from SharePoint  Intro to PnP-JS  Intro to PnP-JS  Part 3  Intro to React  Rebuild Part 2 using React  Intro to Office UI Fabric  Text Box  Button  Creating New Items via PnP  Part 4  SPFx in Teams  Building a Package for Teams  Creating Teams Tab
  • 21. Create Web Part Project  Create a new project directory in your favorite location.  md helloworld-webpart  Go to the project directory.  cd helloworld-webpart  Create a new HelloWorld web part by running the Yeoman SharePoint Generator.  yo @microsoft/sharepoint
  • 22. Create Web Part Project (cont)  When prompted:  Accept the default helloworld-webpart as your solution name, and then select Enter.  Select SharePoint Online only (latest), and select Enter.  Select Use the current folder for where to place the files.  Select N to allow the solution to be deployed to all sites immediately.  Select N on the question if solution contains unique permissions.  Select WebPart as the client-side component type to be created.
  • 23. Create Web Part Project (cont)  The next set of prompts ask for specific information about your web part:  Accept the default HelloWorld as your web part name, and then select Enter.  Accept the default HelloWorld description as your web part description, and then select Enter.  Accept the default No JavaScript web framework as the framework you would like to use, and then select Enter.1
  • 24. Create Web Part Project (cont)  At this point, Yeoman installs the required dependencies and scaffolds the solution files along with the HelloWorld web part. This might take a few minutes.  When the scaffold is complete, you should see the following message indicating a successful scaffold.
  • 25. Preview the web part  Enter the following command in the console to open VS Code:  code .  Enter the following to open the Terminal in VS Code  CTRL + `  Enter the following command in the terminal to build and preview your web part:  gulp serve
  • 26. What is Happening?  SharePoint client-side development tools use gulp as the task runner to handle build process tasks such as:  Bundling and minifying JavaScript and CSS files.  Running tools to call the bundling and minification tasks before each build.  Compiling SASS files to CSS.  Compiling TypeScript files to JavaScript.
  • 27. SharePoint Workbench  Developer design surface that enables you to quickly preview and test web parts without deploying them in SharePoint.
  • 28. Add Your Web Part  To add the HelloWorld web part, select the add icon (this icon appears when you mouse hovers over a section as shown in the previous image).  This opens the toolbox where you can see a list of web parts available for you to add. The list includes the HelloWorld web part as well other web parts available locally in your development environment.
  • 29. Add Your Web Part (cont)  Select HelloWorld to add the web part to the page.
  • 30. Congratulations You have successfully deployed your first SPFx web part
  • 32. Packaging the Web Part  If gulp serve is still running, stop it from running by hitting, ctrl + C  In the console window, enter the following command to package your client-side solution that contains the web part:  gulp clean  gulp build --ship  gulp bundle --ship  gulp package-solution –-ship For dev builds you don’t need the –ship but then you must be running gulp serve Simple Build Script for the SharePoint Framework
  • 33. Deploy to App Catalog  Go to your site's app catalog.  Upload or drag and drop the helloworld-webpart.sppkg to the app catalog.
  • 34. Deploy to App Catalog (cont)  This deploys the client-side solution package. Because this is a full trust client-side solution, SharePoint displays a dialog and asks you to trust the client-side solution to deploy.  Select Deploy.  Notice that you can see if there's any exceptions or issues in the package by looking the App Package Error Message column in the app catalog.
  • 36. Install App in Site  Go to your developer site collection or site collection which you want to use for testing  Select the gears icon on the top nav bar on the right, and then select Add an app to go to your Apps page.  In the Search box, enter helloworld, and select Enter to filter your apps.
  • 37. Install App in Site (cont)  Select the helloworld- webpart-client-side- solution app to install the app on the site.  The client-side solution and the web part are installed on your developer site.
  • 38. Add Web Part to Modern Page  In your browser, go to your site where the solution was just installed.  Select the gears icon in the top nav bar on the right, and then select Add a page.  Edit the page.  Open the web part picker and select your HelloWorld web part.
  • 39. Congratulations You have successfully deployed your first SPFx web part
  • 41. Create a Custom List  Navigate to your site  Gear > Add an app > Custom List  Name: Test  Make at least 2 items
  • 42. Live Development  Enter the following command in the console to build and preview your web part:  gulp serve  On the Page with the webpart add the following to the end of the url  ?loadSPFX=true&debugManifestsFile=https://localhost :4321/temp/manifests.js  BONUS: use SP-Editor [Chrome Extension] to load debug url
  • 43. Modify Code / Verify Connection
  • 45. Import spHttpClient Scroll to the top of the HelloWorldWebPart.ts file
  • 46. Update DOM in Render Function
  • 47. Add Get List Items Function in Render
  • 48. Add Get List Items Function
  • 49. Add Render List Items Function
  • 51. Congratulations You have successfully communicated with SharePoint list data
  • 53. What is PnP-JS?  PnP-JS is a collection of fluent libraries for consuming SharePoint, Graph, and Office 365 REST APIs in a type-safe way.  Benefits:  Intellisense  Typing  Asynchronous  Caching  Clear Code Intent  Abstraction  Open Source
  • 54. Getting Started  Install  npm install @pnp/logging @pnp/common @pnp/odata @pnp/sp @pnp/graph --save  Establish Context  See Right Image Stop any running gulp serve before installing
  • 56. Add Get List Items Function via PnP-JS
  • 57. Replace Get List Items Call
  • 59. Congratulations You have successfully communicated with SharePoint list data via PnP-JS
  • 60. Session 3 Intro to React & Office UI Fabric
  • 61. Bootcamp Outline  Session 1  Getting Started  O365 Developer Program  Tenant Setup  Client Setup  Intro to SPFx  Session 2  Building You First Web Part  Scaffolding  Building  Deployment  Pulling Data from SharePoint  Intro to PnP-JS  Intro to PnP-JS  Session 3  Intro to React  Rebuild Part 2 using React  Intro to Office UI Fabric  Text Box  Button  Creating New Items via PnP  Session 4  SPFx in Teams  Building a Package for Teams  Creating Teams Tab
  • 63. What is React?  JavaScript library for building user interfaces  At a minimum, know this:  Components: These are the building blocks of your app. You want to make them as modular as possible.  State: internal data, that when changed caused the UI to re-render. You own this data.  Props: data / functions, passed to a component. You don’t own this data.  Life Cycle Methods: functions that do things at certain points
  • 64. Building Your First React Web Part
  • 65. Create React Web Part Project  Create a new project directory in your favorite location.  md helloworld-webpart-2  Go to the project directory.  cd helloworld-webpart-2  Create a new HelloWorld web part by running the Yeoman SharePoint Generator.  yo @microsoft/sharepoint
  • 66. Create Web Part Project (cont)  When prompted:  Accept the default helloworld-webpart-2 as your solution name, and then select Enter.  Select SharePoint Online only (latest), and select Enter.  Select Use the current folder for where to place the files.  Select N to allow the solution to be deployed to all sites immediately.  Select N on the question if solution contains unique permissions.  Select WebPart as the client-side component type to be created.
  • 67. Create Web Part Project (cont)  The next set of prompts ask for specific information about your web part:  Accept the default HelloWorld as your web part name, and then select Enter.  Accept the default HelloWorld description as your web part description, and then select Enter.  Select React as the framework you would like to use, and then select Enter.1
  • 68. Open with Visual Studio Code  Type the following command:  code .  Use the VS Code console to run gulp commands
  • 69. Create Web Part Project (cont)  At this point, Yeoman installs the required dependencies and scaffolds the solution files along with the HelloWorld web part. This might take a few minutes.  When the scaffold is complete, you should see the following message indicating a successful scaffold.
  • 70. Next Steps  Open VS Code  Build / Bundle / Package  Deploy to SharePoint App Catalog  Add App to SharePoint Site  Add to Page
  • 71. Add PnP-JS to Project  Install  npm install @pnp/logging @pnp/common @pnp/odata @pnp/sp @pnp/graph --save  Establish Context in HelloWorldWebPart.ts  See Right Image
  • 72. Add State Interface Definition
  • 73. Import State, Use Constructor to Initialize
  • 74. Import PnP-JS & Add State Interface
  • 75. Add Get Items via PnP
  • 76. Add Life Cycle Method
  • 79. Congratulations You have successfully created a React Web Part with PnP-JS
  • 80. Intro to Office UI Fabric The Design Language of Microsoft Products
  • 81. What is the Office UI Fabric?  Microsoft’s UX Framework to create seamless experiences in Microsoft products  Two Flavors Available  Fabric React – open-source React front-end framework designed to build experiences that fit seamlessly into a broad range of Microsoft products.  Fabric Core – open-source collection of CSS classes and Sass mixins that give you access to Fabric's colors, animations, fonts, icons and grid. Think of it as a bunch of styles and a bunch of controls… similar to bootstrap
  • 84. Component Example - TextField
  • 85. Building a Feedback Web Part Let’s combine everything we’ve learned!
  • 86. Add Office UI Fabric to Project
  • 87. Let’s Add a Button
  • 90. Create OnClick Function for Button Component
  • 91. Add OnClick Event to Button Component
  • 92. Let’s Add a Text Field
  • 95. Add TextField State Variable on Interface
  • 96. Initialize TextField State Variable in Component State
  • 98. Create OnChange Function for TextField
  • 99. Add State Value to TextField Component
  • 100. Create Add New List Items via PnP Function
  • 101. Update Get List Items Add OrderBy & Top
  • 104. Wire Button to Submit New Item, then Get New Items
  • 106. List Data in SharePoint
  • 107. Congratulations You have successfully created a Feedback Web using React, Office UI Fabric & PnP-JS
  • 108. Session 4 Building SPFx Solutions for Tabs within Teams
  • 109. Bootcamp Outline  Session 1  Getting Started  O365 Developer Program  Tenant Setup  Client Setup  Intro to SPFx  Session 2  Building You First Web Part  Scaffolding  Building  Deployment  Pulling Data from SharePoint  Intro to PnP-JS  Intro to PnP-JS  Session 3  Intro to React  Rebuild Part 2 using React  Intro to Office UI Fabric  Text Box  Button  Creating New Items via PnP  Session 4  SPFx in Teams  Building a Package for Teams  Creating Teams Tab
  • 111. Teams Folder  Starting with the SharePoint Framework v1.8, scaffolding will also include additional ./teams folder  Teams folder contains the following two files:  [componentId]_color.png - Default small picture for a tab  [componentId]_outline.png - Default large picture for a tab  These images will be used as icons in Microsoft Teams.  Teams Manifest – Defines the app, by default not there SharePoint will create it for you!@  https://docs.microsoft.com/en- us/sharepoint/dev/spfx/web-parts/get-started/using- web-part-as-ms-teams-tab
  • 112. Update Web Part Manifest
  • 113. Import Microsoft Teams – HelloWorldWebPart.ts
  • 117. Update Render to Show Different Context
  • 118. Set to Tenant Wide Deployment
  • 119. Rebuild  If gulp serve is still running, stop it from running by hitting, ctrl + C  In the console window, enter the following command to package your client-side solution that contains the web part:  gulp clean  gulp build --ship  gulp bundle --ship  gulp package-solution –-ship Simple Build Script for the SharePoint Framework
  • 120. Update Package in App Catalog Upload or Drag and Drop .SPPKG in to the App Catalog
  • 122. In Team Channel, Add a Tab
  • 126. Congratulations You have successfully created a Feedback Web using React, Office UI Fabric & PnP-JS
  • 127. Thanks For Attending  Must Fill In – Event Survey!!!  https://aka.ms/Microsoft365DevB ootcampSurvey2019
  • 128. Voitanos On-Demand Training  The best SPFx training resource – hands down, always updated, on demand.  ~$750 for the Ultimate Package. Worth It!  Taught by Andrew Connell, 15+ year MVP in SharePoint / Office 365 “Understanding the SPFx Dev Toolchain” email course [FREE] Mastering the SharePoint Framework On Demand http://bit.ly/m365-pa-2 http://bit.ly/m365-pa-free
  • 129. Need Assistance?  Microsoft Partner  Inc 5000 [3 years]  What We Do  Digital Workspace  Cloud Services [Azure/AWS]  Managed Services  Data & Analytics  Quality Assurance  Development  Staffing / Recruitment https://www.anexinet.com/
  • 130. Reach Out Thomas Daly Office Servers & Services MVP O365 UG + SPSNYC SoHo Dragon Team Lead thomasd@sohodragon.com @_tomdaly_ Manpreet Singh Office Servers & Services MVP C# Corner MVP SPSPhilly SharePoint Consultant manpreetletterbox@hotmail.com Jason Rivera Tri-State Office 365 UG + SPSPhilly Anexinet Solution Architect jrivera@anexinet.com @SharePointJR
  • 131. Resources All Content comes from the Official Microsoft Documentation Code / Cheat Sheets - Part 2, 3 & 4 – all on github https://github.com/tom- daly/demos/tree/master/m365- bootcamp Slides https://1drv.ms/p/s!AmWInMQz NTOFmIFf3K2PaPvODtykyg?e=9 aVBS8