SlideShare a Scribd company logo
Building Great
Client-side Web
Parts with SPFx, PnP-
JS-Core, ReactJS
and Office UI Fabric
Bill Ayers
14 octobre 2017
#SPSParis
Merci pour votre soutien
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, ReactJS and Office UI Fabric
Eur Ing Dr Bill Ayers
MCM/MCSM Charter SharePoint
MVP, MCT, MCTS, MCITP, MCSD, MCAD, MCSA, MCDBA, Professional
Scrum Master, etc. etc.
Flow Simulation Ltd.
www.SPDoctor.net
BillA@flosim.com
@SPDoctor
Consultant specialising in SharePoint and
Office 365 Development and Architecture
for Collaboration and Mobile Development
• SharePoint Development Backstory
• The SharePoint Framework
• ReactJS
• Office UI Fabric
• OfficeDev PnP and PnP-JS-Core library
• Building an SPFx WebPart
• Conclusions
Agenda
Cloud Hosted Add-ins
Remote Web
S2S Trust
OAuth (O365)
SharePoint Web Server
Managed CSOM
or REST
Cross-domain Request
Host Web
X D
• Branding
• Add behaviour
• Script Editor Web Part
• Effective, but many problems
SharePoint/Office 365
SharePoint Page
SPWeb
JavaScript Injection
JavaScript
Managed CSOM
or REST API
or MS Graph API
Limitations
• No deployment or packaging model – DIY
• No central control
• Master page may change!
• Scripting disabled by default for personal sites and self-service sites in
SharePoint Online and root site collection
• When scripting is disabled…
• Links removed from Site Settings page
• SharePoint Designer capabilities reduced
• Can’t edit master pages or page layouts
• Can’t edit theme for current site
• Missing Web Parts (e.g. Script Editor, Content Editor)
• Can’t upload .aspx files to document libraries
• Enable scripting with UI, CSOM or PowerShell
Introducing the SharePoint
Framework (SPFx)
Model for building client-side pages, web
parts and more
Announced May 4th 2016, now GA!
Authoring canvas, no iFrames
Command-line-driven open-source
toolchain (or community VS extension)
Used by SharePoint product team
Works in “modern” and “classic” pages
Your choice of client-side framework;
Angular, React, Knockout, Vanilla.JS ;-)
Office 365/SharePoint Online
On-premises: SP2016 FP2 (now GA)
Modern Site Pages
Easily create powerful, beautiful looking
pages
Modern building blocks
Mobile support is built in from the start
Pages get better with the Microsoft Graph
New SPFx Extension Types
Announced at //build/ 2017
• ApplicationCustomizers allow developers to add script to the page, as
well as access well-known HTML element placeholders and extend
them with custom renderings
• FieldCustomizers can be used to provide modified views to data for
fields within a list
• CommandSets let developers extend the command surfaces of
SharePoint to add new actions, along with client-side code that can be
used to implement behaviours
• Web Part Connections enable more connected web parts that can work
together to share information
• Communication Sites (announced at #SPSummit)
Wait, did you say
“Command-line-driven
open-source toolchain” ?
Things You Need…
• Node.js (LTS version)
• Gulp
• Yeoman
• Git
• Editor (e.g. VS Code)
• Yeoman generator for SharePoint Framework
• Technologies like WebPack, SASS and other libraries will
be installed by Node’s package manager - NPM
…or use Visual Studio extension:
https://github.com/SharePoint/sp-dev-fx-vs-extension
• Features of next version(s) of
JavaScript/ECMAScript standard
• Compiles to JavaScript (ES5)
• Strong typing, classes
• Original design goal was to make JavaScript
easier for C# developers
• Makes it easier to write production quality
JavaScript
• Good support in VS Code
• Development language for the base templates in
SharePoint Framework
https://www.typescriptlang.org/
ReactJS
• Backed by Facebook and Instagram
• Component design (composition)
• Very fast Virtual DOM page rendering model
• Provides the view engine only
• JSX format takes some getting used to 
• TypeScript Compiler has support for JSX (TSX)
• Used by Microsoft
• ReactJS tutorial: https://zapier.com/engineering/react-js-tutorial-guide-
gotchas/ or https://facebook.github.io/react/
var button = <Button>Hello, world!</Button>;
Office UI Fabric
• Responsive framework (kind-of)
• Office Design Language for web
• Designed for Office Add-ins by
OneDrive and SharePoint Design Studio
• Consistent look-and-feel with Office
• “Modern”, not “classic” SharePoint CSS
• About 100k, 200k with components
• Available as raw CSS or versions for Angular and React
• Dev.office.com/fabric
Office UI Fabric
• Design elements to give add-ins the same look
and feel as the rest of the Office suite
• Consistent typography, icons and behaviour
Link to UI Fabric Stylesheets:
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.2.0/fabric.min.css">
<link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.2.0/fabric.components.min.css">
Decorate elements with UI Fabric classes:
<button class="ms-Button" id="get-data-from-selection">
<span class="ms-Button-icon"><em class="ms-Icon ms-Icon--plus"></em></span>
<span class="ms-Button-label">Get Data from selection</span>
<span class="ms-Button-description">Get Data from the document selection</span>
</button>
http://dev.office.com/fabric
Link to UI Fabric JS:
<script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.2.0/js/fabric.min.js"></script>
Office UI Fabric ReactJS
Components
• 30 re-useable React components, ready to use
• Used by Microsoft to build Office and SharePoint
• Angular? See ngOfficeUIFabric
import Button from 'office-ui-fabric-react';
Var b = <Button onClick={() => this.getData() }
className="ms-Button--primary">
Refresh List</Button>
Breadcrumb
Button
Callout
Checkbox
ChoiceGroup
ColorPicker
CommandBar
ContextualMenu
DatePicker
DetailsList
Dialog
DocumentCard
Dropdown
Facepile
GroupedList
Image
Label
Layer
Link
List
MessageBar
Nav
Overlay
Panel
Persona
Pickers
PeoplePicker
Pivot
ProgressIndicator
SearchBox
Slider
Spinner
TextField
Toggle
OfficeDev PnP Initiative
• PnP-JS-Core
• Still under development
• JavaScript wrapper for SharePoint REST APIs
• Good fit for SPFx development
• Github.com/SharePoint/PnP-JS-Core
• “Home” of SPFx guidance, documentation, samples, etc.
• Dev.Office.com/SharePoint is starting point
• Code hosted on GitHub
Looking at ReactJS
Looking at Office UI Fabric
Looking at OfficeDev PnP-JS-Core
Building an SPFx WebPart
Conclusions
• “Modern” SharePoint development
tools are your choice
• The “old” stuff still works
• Build re-usable components with
ReactJS
• PnP-JS-Core makes SharePoint
REST easy
• Office-UI-Fabric makes web parts
beautiful
• We are on a journey – join us!
Resources:
• http://dev.office.com/SharePoint
• http://dev.office.com/fabric
• https://facebook.github.io/react/
• https://github.com/SharePoint/PnP-JS-Core
• https://github.com/OfficeDev/TrainingContent/SharePoint
• http://github.com/SPDoctor/SPFXShoppingList
Bingle
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, ReactJS and Office UI Fabric
Thank you, for your for #SPSParis
Ad

More Related Content

What's hot (20)

Modern SharePoint, the Good, the Bad, and the Ugly
Modern SharePoint, the Good, the Bad, and the UglyModern SharePoint, the Good, the Bad, and the Ugly
Modern SharePoint, the Good, the Bad, and the Ugly
Bob German
 
Uncovering the Latest in SharePoint Development
Uncovering the Latest in SharePoint DevelopmentUncovering the Latest in SharePoint Development
Uncovering the Latest in SharePoint Development
Eric Overfield
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
Małgorzata Borzęcka
 
Add ins share-point provider hosted
Add ins share-point provider hostedAdd ins share-point provider hosted
Add ins share-point provider hosted
Fabian Imaz
 
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuerySharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
Ken Kuzdas
 
Developing with SharePoint Framework (SPFx) on-premises
Developing with SharePoint Framework (SPFx) on-premisesDeveloping with SharePoint Framework (SPFx) on-premises
Developing with SharePoint Framework (SPFx) on-premises
Dragan Panjkov
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx Extensions
NCCOMMS
 
Dynamic no-code mashups in SharePoint 2010 and 2013
Dynamic no-code mashups in SharePoint 2010 and 2013Dynamic no-code mashups in SharePoint 2010 and 2013
Dynamic no-code mashups in SharePoint 2010 and 2013
C/D/H Technology Consultants
 
Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2
Eric Overfield
 
SPUnite17 Introduction to the Office Dev PnP Core Libraries
SPUnite17 Introduction to the Office Dev PnP Core LibrariesSPUnite17 Introduction to the Office Dev PnP Core Libraries
SPUnite17 Introduction to the Office Dev PnP Core Libraries
NCCOMMS
 
Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016
Stefan Bauer
 
SPUnite17 Migrating your Customizations from On-prem to SharePoint Online
SPUnite17 Migrating your Customizations from On-prem to SharePoint OnlineSPUnite17 Migrating your Customizations from On-prem to SharePoint Online
SPUnite17 Migrating your Customizations from On-prem to SharePoint Online
NCCOMMS
 
[Jansen] Transforming your classic team sites into modern group connected tea...
[Jansen] Transforming your classic team sites into modern group connected tea...[Jansen] Transforming your classic team sites into modern group connected tea...
[Jansen] Transforming your classic team sites into modern group connected tea...
European Collaboration Summit
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
Sean McLellan
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
European Collaboration Summit
 
Introduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutionsIntroduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutions
SPC Adriatics
 
ECS19 - Katja Jokisalo - Modernize your Intranet
ECS19 - Katja Jokisalo - Modernize your IntranetECS19 - Katja Jokisalo - Modernize your Intranet
ECS19 - Katja Jokisalo - Modernize your Intranet
European Collaboration Summit
 
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
European Collaboration Summit
 
What's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userWhat's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end user
SPC Adriatics
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 
Modern SharePoint, the Good, the Bad, and the Ugly
Modern SharePoint, the Good, the Bad, and the UglyModern SharePoint, the Good, the Bad, and the Ugly
Modern SharePoint, the Good, the Bad, and the Ugly
Bob German
 
Uncovering the Latest in SharePoint Development
Uncovering the Latest in SharePoint DevelopmentUncovering the Latest in SharePoint Development
Uncovering the Latest in SharePoint Development
Eric Overfield
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
Małgorzata Borzęcka
 
Add ins share-point provider hosted
Add ins share-point provider hostedAdd ins share-point provider hosted
Add ins share-point provider hosted
Fabian Imaz
 
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuerySharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
SharePoint - Creating Beautiful Yet Powerful Dashboards Using jQuery
Ken Kuzdas
 
Developing with SharePoint Framework (SPFx) on-premises
Developing with SharePoint Framework (SPFx) on-premisesDeveloping with SharePoint Framework (SPFx) on-premises
Developing with SharePoint Framework (SPFx) on-premises
Dragan Panjkov
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx Extensions
NCCOMMS
 
Dynamic no-code mashups in SharePoint 2010 and 2013
Dynamic no-code mashups in SharePoint 2010 and 2013Dynamic no-code mashups in SharePoint 2010 and 2013
Dynamic no-code mashups in SharePoint 2010 and 2013
C/D/H Technology Consultants
 
Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2
Eric Overfield
 
SPUnite17 Introduction to the Office Dev PnP Core Libraries
SPUnite17 Introduction to the Office Dev PnP Core LibrariesSPUnite17 Introduction to the Office Dev PnP Core Libraries
SPUnite17 Introduction to the Office Dev PnP Core Libraries
NCCOMMS
 
Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016Branding Deployment in Office 365 and SharePoint 2013/2016
Branding Deployment in Office 365 and SharePoint 2013/2016
Stefan Bauer
 
SPUnite17 Migrating your Customizations from On-prem to SharePoint Online
SPUnite17 Migrating your Customizations from On-prem to SharePoint OnlineSPUnite17 Migrating your Customizations from On-prem to SharePoint Online
SPUnite17 Migrating your Customizations from On-prem to SharePoint Online
NCCOMMS
 
[Jansen] Transforming your classic team sites into modern group connected tea...
[Jansen] Transforming your classic team sites into modern group connected tea...[Jansen] Transforming your classic team sites into modern group connected tea...
[Jansen] Transforming your classic team sites into modern group connected tea...
European Collaboration Summit
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
Sean McLellan
 
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - RoadmapECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
ECS19 - Vesa Juvonen - Getting Started With SharePoint Framework - Roadmap
European Collaboration Summit
 
Introduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutionsIntroduction to Office 365 PnP- Reusable solutions
Introduction to Office 365 PnP- Reusable solutions
SPC Adriatics
 
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting SecretsECS19 - John White - Unlock SharePoint’s Reporting Secrets
ECS19 - John White - Unlock SharePoint’s Reporting Secrets
European Collaboration Summit
 
What's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end userWhat's in SharePoint land 2016 for the end user
What's in SharePoint land 2016 for the end user
SPC Adriatics
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - referenceChris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 

Similar to SPS Paris: Building great client-side web parts with spfx, pnp-js-core, ReactJS and Office UI Fabric (20)

SPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFxSPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFx
NCCOMMS
 
SPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add insSPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add ins
NCCOMMS
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure Services
Brian Culver
 
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your Way
D'arce Hess
 
Building share point framework solutions
Building share point framework solutionsBuilding share point framework solutions
Building share point framework solutions
Dipti Chhatrapati
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
European Collaboration Summit
 
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
BIWUG
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePoint
Kirti Prajapati
 
My Resume_Uday -
My Resume_Uday -My Resume_Uday -
My Resume_Uday -
Uday Kiran
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
Marc D Anderson
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Fabio Franzini
 
Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020
Microsoft 365 Developer
 
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
SharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 Development
Sébastien Levert
 
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 DevelopmentSharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
Sébastien Levert
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
Sébastien Levert
 
SPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFxSPUnite17 Building Great Client Side Web Parts with SPFx
SPUnite17 Building Great Client Side Web Parts with SPFx
NCCOMMS
 
SPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add insSPUnite17 Become a Developer Hero by Building Office Add ins
SPUnite17 Become a Developer Hero by Building Office Add ins
NCCOMMS
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure Services
Brian Culver
 
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
Your Intranet, Your Way
Your Intranet, Your WayYour Intranet, Your Way
Your Intranet, Your Way
D'arce Hess
 
Building share point framework solutions
Building share point framework solutionsBuilding share point framework solutions
Building share point framework solutions
Dipti Chhatrapati
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
European Collaboration Summit
 
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
BIWUG
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore
 
Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?Custom Development in SharePoint – What are my options now?
Custom Development in SharePoint – What are my options now?
Talbott Crowell
 
SPFx- A modern development model for SharePoint
SPFx- A modern development model  for SharePointSPFx- A modern development model  for SharePoint
SPFx- A modern development model for SharePoint
Kirti Prajapati
 
My Resume_Uday -
My Resume_Uday -My Resume_Uday -
My Resume_Uday -
Uday Kiran
 
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
SPS Monaco 2017 - The Lay of the Land of Client-Side Development circa 2017
Marc D Anderson
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Fabio Franzini
 
Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020Office Add-ins developer community call-January 2020
Office Add-ins developer community call-January 2020
Microsoft 365 Developer
 
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
How to build a Project Hub with Hubsites and Sitedesign and Sitescripts
Knut Relbe-Moe [MVP, MCT]
 
SharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago - From SharePoint to Office 365 Development
SharePoint Fest Chicago - From SharePoint to Office 365 Development
Sébastien Levert
 
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 DevelopmentSharePoint Saturday Ottawa - From SharePoint to Office 365 Development
SharePoint Saturday Ottawa - From SharePoint to Office 365 Development
Sébastien Levert
 
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
ESPC 2016 - From SharePoint to Office 365 Development - The path to your new ...
Sébastien Levert
 
Ad

Recently uploaded (20)

How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Ad

SPS Paris: Building great client-side web parts with spfx, pnp-js-core, ReactJS and Office UI Fabric

  • 1. Building Great Client-side Web Parts with SPFx, PnP- JS-Core, ReactJS and Office UI Fabric Bill Ayers 14 octobre 2017 #SPSParis
  • 4. Eur Ing Dr Bill Ayers MCM/MCSM Charter SharePoint MVP, MCT, MCTS, MCITP, MCSD, MCAD, MCSA, MCDBA, Professional Scrum Master, etc. etc. Flow Simulation Ltd. www.SPDoctor.net [email protected] @SPDoctor Consultant specialising in SharePoint and Office 365 Development and Architecture for Collaboration and Mobile Development
  • 5. • SharePoint Development Backstory • The SharePoint Framework • ReactJS • Office UI Fabric • OfficeDev PnP and PnP-JS-Core library • Building an SPFx WebPart • Conclusions Agenda
  • 6. Cloud Hosted Add-ins Remote Web S2S Trust OAuth (O365) SharePoint Web Server Managed CSOM or REST Cross-domain Request Host Web X D
  • 7. • Branding • Add behaviour • Script Editor Web Part • Effective, but many problems SharePoint/Office 365 SharePoint Page SPWeb JavaScript Injection JavaScript Managed CSOM or REST API or MS Graph API
  • 8. Limitations • No deployment or packaging model – DIY • No central control • Master page may change! • Scripting disabled by default for personal sites and self-service sites in SharePoint Online and root site collection • When scripting is disabled… • Links removed from Site Settings page • SharePoint Designer capabilities reduced • Can’t edit master pages or page layouts • Can’t edit theme for current site • Missing Web Parts (e.g. Script Editor, Content Editor) • Can’t upload .aspx files to document libraries • Enable scripting with UI, CSOM or PowerShell
  • 9. Introducing the SharePoint Framework (SPFx) Model for building client-side pages, web parts and more Announced May 4th 2016, now GA! Authoring canvas, no iFrames Command-line-driven open-source toolchain (or community VS extension) Used by SharePoint product team Works in “modern” and “classic” pages Your choice of client-side framework; Angular, React, Knockout, Vanilla.JS ;-) Office 365/SharePoint Online On-premises: SP2016 FP2 (now GA)
  • 10. Modern Site Pages Easily create powerful, beautiful looking pages Modern building blocks Mobile support is built in from the start Pages get better with the Microsoft Graph
  • 11. New SPFx Extension Types Announced at //build/ 2017 • ApplicationCustomizers allow developers to add script to the page, as well as access well-known HTML element placeholders and extend them with custom renderings • FieldCustomizers can be used to provide modified views to data for fields within a list • CommandSets let developers extend the command surfaces of SharePoint to add new actions, along with client-side code that can be used to implement behaviours • Web Part Connections enable more connected web parts that can work together to share information • Communication Sites (announced at #SPSummit)
  • 12. Wait, did you say “Command-line-driven open-source toolchain” ?
  • 13. Things You Need… • Node.js (LTS version) • Gulp • Yeoman • Git • Editor (e.g. VS Code) • Yeoman generator for SharePoint Framework • Technologies like WebPack, SASS and other libraries will be installed by Node’s package manager - NPM …or use Visual Studio extension: https://github.com/SharePoint/sp-dev-fx-vs-extension
  • 14. • Features of next version(s) of JavaScript/ECMAScript standard • Compiles to JavaScript (ES5) • Strong typing, classes • Original design goal was to make JavaScript easier for C# developers • Makes it easier to write production quality JavaScript • Good support in VS Code • Development language for the base templates in SharePoint Framework https://www.typescriptlang.org/
  • 15. ReactJS • Backed by Facebook and Instagram • Component design (composition) • Very fast Virtual DOM page rendering model • Provides the view engine only • JSX format takes some getting used to  • TypeScript Compiler has support for JSX (TSX) • Used by Microsoft • ReactJS tutorial: https://zapier.com/engineering/react-js-tutorial-guide- gotchas/ or https://facebook.github.io/react/ var button = <Button>Hello, world!</Button>;
  • 16. Office UI Fabric • Responsive framework (kind-of) • Office Design Language for web • Designed for Office Add-ins by OneDrive and SharePoint Design Studio • Consistent look-and-feel with Office • “Modern”, not “classic” SharePoint CSS • About 100k, 200k with components • Available as raw CSS or versions for Angular and React • Dev.office.com/fabric
  • 17. Office UI Fabric • Design elements to give add-ins the same look and feel as the rest of the Office suite • Consistent typography, icons and behaviour Link to UI Fabric Stylesheets: <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.2.0/fabric.min.css"> <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.2.0/fabric.components.min.css"> Decorate elements with UI Fabric classes: <button class="ms-Button" id="get-data-from-selection"> <span class="ms-Button-icon"><em class="ms-Icon ms-Icon--plus"></em></span> <span class="ms-Button-label">Get Data from selection</span> <span class="ms-Button-description">Get Data from the document selection</span> </button> http://dev.office.com/fabric Link to UI Fabric JS: <script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.2.0/js/fabric.min.js"></script>
  • 18. Office UI Fabric ReactJS Components • 30 re-useable React components, ready to use • Used by Microsoft to build Office and SharePoint • Angular? See ngOfficeUIFabric import Button from 'office-ui-fabric-react'; Var b = <Button onClick={() => this.getData() } className="ms-Button--primary"> Refresh List</Button> Breadcrumb Button Callout Checkbox ChoiceGroup ColorPicker CommandBar ContextualMenu DatePicker DetailsList Dialog DocumentCard Dropdown Facepile GroupedList Image Label Layer Link List MessageBar Nav Overlay Panel Persona Pickers PeoplePicker Pivot ProgressIndicator SearchBox Slider Spinner TextField Toggle
  • 19. OfficeDev PnP Initiative • PnP-JS-Core • Still under development • JavaScript wrapper for SharePoint REST APIs • Good fit for SPFx development • Github.com/SharePoint/PnP-JS-Core • “Home” of SPFx guidance, documentation, samples, etc. • Dev.Office.com/SharePoint is starting point • Code hosted on GitHub
  • 20. Looking at ReactJS Looking at Office UI Fabric Looking at OfficeDev PnP-JS-Core Building an SPFx WebPart
  • 21. Conclusions • “Modern” SharePoint development tools are your choice • The “old” stuff still works • Build re-usable components with ReactJS • PnP-JS-Core makes SharePoint REST easy • Office-UI-Fabric makes web parts beautiful • We are on a journey – join us!
  • 22. Resources: • http://dev.office.com/SharePoint • http://dev.office.com/fabric • https://facebook.github.io/react/ • https://github.com/SharePoint/PnP-JS-Core • https://github.com/OfficeDev/TrainingContent/SharePoint • http://github.com/SPDoctor/SPFXShoppingList Bingle
  • 24. Thank you, for your for #SPSParis