SlideShare a Scribd company logo
1 of 30
BUILD YOUR
FIRST SHAREPOINT
FRAMEWORK WEBPART
https://github.com/eoverfield/SPFx-Demos
ERIC OVERFIELD | PixelMill
Microsoft MVP & RD
SharePoint Advocate & Enthusiast
@ericoverfield
ERIC OVERFIELD
President & Co-Founder of PixelMill
Microsoft MVP, Office Servers & Services
Microsoft Regional Director
Published SharePoint Author
SharePoint Community Organizer & Contributor @ericoverfield
ericoverfield.com
PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of
web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the
user adoption of SharePoint intranets, extranets, and public facing sites.
PIXELMILL
@pixelmillteam
pixelmill.com
1. SharePoint Framework (SPFx) Overview
2. SPFx Toolchain – the Build Environment
3. SPFx Webpart Components
4. Webpart Properties, Packaging & More
OVERVIEW
@ericoverfieldericoverfield.com
HISTORY OF SHAREPOINT DEVELOPMENT MODELS
2013
APP/ADD-IN MODEL
2010
SANDBOX
2003
FULL TRUST
2016
CLOUD FRIENDLY SPFx
A page and web part model with full support for client-side SharePoint development
• Open source tooling / toolchain
• nodeJS, npm, Yeoman, gulp, TypeScript, webpack and more
• Easy integration with SharePoint data
• Rest API wrapper classes
• Available in the cloud and On-prem*
• Generally available on SharePoint Online
• On-prem availability scheduled for 2017
WHAT IS THE SHAREPOINT FRAMEWORK?
SPFx – Welcome to integrated client-side rendering
• Client-side rendering
• No server side/compiled code / C#
• IDE / Development platform agnostic
• New / modern tool chain
• nodeJS / Yeoman / Gulp / Reach / etc
• Not dependent on JavaScript Injection
• No iFrame
• Direct integration with the page model
HOW THE FRAMEWORK IS DIFFERENT
@ericoverfieldericoverfield.com
TOOLSET COMPARISION
Project Templates
SERVER SIDE DEVELOPMENT VS SPFx TOOL CHAIN
THE SPFx TOOLCHAIN
A DEVELOPMENT ENVIRONMENT
• Office 365 / SharePoint Online tenant
• App catalog for deployment
• http://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant#create-app-catalog-site
• Development workstation
• PC / iOS / Linux – few limitations
• Toolchain is open source – do not need a dedicated dev env
• Much more simple than classic SharePoint Development
PREREQUISITES
• https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview
• Use any most OS / workstation
• Install nodeJS (current Long Term Support (LTS) version)
• Yeoman and Gulp
• C:> npm i –g yo gulp
• SPFx Yeoman generator
• C:> npm i –g @microsoft/generator-sharepoint
• C:> npm update –g @microsoft/generator-sharepoint
• Use code editor
• VS Code / Sublime Text / NotePad++, etc
A SHAREPOINT FRAMEWORK DEVELOPMENT ENVIRONMENT
Demo
SPFx DEVELOPMENT ENVIRONMENT
• C:> md helloworld-webpart
• C:> cd helloworld-webpart
• C:> yo @microsoft/sharepoint
• Grab a cup of coffee – first time in a project, this will take a while
• You can execute yo command again to add more webparts to project
• Each addition of a webpart to a project will take much less time to scaffold
• C:> gulp serve
• Check out your first webpart!
• It “should” be that simple
• May also load in SPO workbench:
https://”tenant”.sharepoint.com/sites/”site”/_layouts/15/workbench.aspx
CREATE YOUR FIRST SPFx WEBPART
Demo
YOUR FIRST
SPFx WEBPART
WELCOME TO A NEW
DEVELOPMENT PARADIGM
WEBPART SOURCE OVERVIEW
Get to know your Webpart folder structure
• src: primary webpart TypeScript source code
• config: json configuration files for build process
• typings: TypeScript typings for JS libs – legacy
• lib: Build files (TS compiled JS) ready for bundle
• dist: Final web ready code for distribution
• sharepoint: .spapp file for App Catalog
• node_modules: NodeJS modules (JS) for toolchain
@ericoverfieldericoverfield.com
WEBPART PROPERTIES
Webparts normally need custom properties
• Webparts normally need custom properties
• Define: /src/webparts/”webpart”/”webpart”Props.ts
• Add in JSON
• Default values: /src/webparts/”webpart”/”webpart”.manifest.json
• Add in JSON: preconfiguredEntries.properties
• Display: /src/webparts/”webpart”/”webpart”.ts
• Method: protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {}
• Override onchange: /src/webparts/”webpart”/”webpart”.ts
• Method: public onPropertyPaneFieldChanged (propertyPath: string, oldValue: any ,
newValue: any) {}
@ericoverfieldericoverfield.com
ACCESS DYNAMIC DATA IN PROPERTY PANE
• Method getPropertyPaneConfiguration returns a static IPropertyPaneConfiguration
• Method does not allow for Promises / dynamic data
• Solution: Load dynamic data within onPropertyPaneConfigurationStart() or onInit() then
trigger pane refresh
• this.context.propertyPane.refresh(); //cause pane to refresh with new data
@ericoverfieldericoverfield.com
CONNECT TO SHAREPOINT / DYNAMIC DATA
• SPFx provides tools to quickly interact with external API data
• TypeScript Http classes within @microsoft/sp-http
• this.context always includes spHttpClient!
• HttpClient
• Basic set of features for REST operations with any external resource
• SPHttpClient
• REST calls against SharePoint
• Handles context, security, etc. Could use HttpClient if desired
import { SPHttpClient } from '@microsoft/sp-http';
this.context.spHttpClient.get(this.context.pageContext.web.absoluteUrl +
`/_api/Lists/?$select=Id,Title&$filter=Hidden ne true`, SPHttpClient.configurations.v1)
.then((response: SPHttpClientResponse) => {
return response.json();
});
}
Demo
SPFx WEBPART: OVERVIEW,
PROPERTIES AND SHAREPOINT DATA
PACKAGE YOUR WEBPART FOR DEPLOYMENT
• Set deployment configuration
• config/package-solution.json – general settings and package name
• write-manifests.json – CDN / bundle location – for dev, can serve locally: gulp serve --nobrowser
• C:> gulp clean (cleans sharepoint and temp folders)
• C:> gulp build (Rebuilds the solution)
• C:> gulp bundle (Creates the solution bundles)
• C:> gulp package-solution (Creates /sharepoint/”webpart”.spapp)
• C:> gulp –ship (minifies bundle and reads in CDN info from config/write-manifests.json)
• C:> gulp package-solution --ship (Recreates /sharepoint/”webpart”.spapp with CDN info)
PACKAGE YOUR WEBPART FOR DEPLOYMENT
• After solution created, can then add to SharePoint
• Add .spapp to app catalog
• Add app to SharePoint site
• Add webpart in site to content page
• Webpart is still pointing to local host for JS
• Configure CDN for full webpart deployment
• https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/deploy-web-part-to-cdn
• Or manually deploy solution bundle and config write-manifests.json
Demo
DEPLOY SPFx WEBPART
TO SHAREPOINT
CONNECT TO EXTERNAL LIBRARIES / FRAMEWORKS / RESOURCES
• External libraries and component require Typings
• i.e. for jQuery:
• C:> npm install --save jquery
• C:> npm install --save @types/jquery
• Add to bundle – config/config.json
"externals": {
"jquery":"node_modules/jquery/dist/jquery.min.js“
},
• Within webpart
• import * as myjQuery from 'jquery';
• Access: let $workspace: jQuery = myjQuery(‘#spPageChromeAppDiv');
SPFx COMMAND REFERENCE
• yo @microsoft/sharepoint // create a new base project
• gulp serve // compile and start up local workbench
• gulp serve --nobrowser // same as serve, but with no browser loaded
• gulp package-solution // compile / create spapp file for redeployment in "Sharepoint" folder
• gulp package-solution --ship // create minified component assets
• gulp bundle // generate assets (js, css, etc) for deployment to CDN
• gulp deploy-azure-storage // deploy assets to Azure storage as defined in config/deploy-azure-
storage.json
1. Learn TypeScript!
2. Use SPHttpClient to connect to SharePoint
• HttpClient for other API’s
3. Use frameworks and libraries that already has typings
4. Office UI Fabric available for consistent styling
5. Further Documentation Likely Exists
• https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview
RECOMMENDATIONS
REVIEW
1. SharePoint Framework (SPFx) Overview
2. SPFx Toolchain – the Build Environment
3. SPFx Webpart Components
4. Webpart Properties, Packaging & More
RESOURCES
RESOURCES
• SharePoint Framework documentation
https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview
• SharePoint Framework API
https://dev.office.com/sharepoint/reference/spfx/sharepoint-framework-reference-overview
• Build your first webpart
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part
• Add properties to a SPFx Webpart
https://dev.office.com/sharepoint/docs/spfx/web-parts/basics/integrate-with-property-pane
• Connect a SPFx webpart to SharePoint Data
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/connect-to-sharepoint
• Webpart with React and Office UI Fabric
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/use-fabric-react-components
• Get an introduction to the SharePoint Framework
https://channel9.msdn.com/Events/Ignite/2016/BRK2114-TS
• Demo Source Code
https://github.com/eoverfield/SPFx-Demos
THANK YOU
BUILD YOUR
FIRST SHAREPOINT
FRAMEWORK WEBPART

More Related Content

What's hot

Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsEric Overfield
 
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Fabio Franzini
 
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...Bill Ayers
 
An Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectAn Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectSPC Adriatics
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsNCCOMMS
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentChris O'Brien
 
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 userSPC Adriatics
 
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 OnlineNCCOMMS
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...European Collaboration Summit
 
Getting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning EngineGetting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning EngineSPC Adriatics
 
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 solutionsSPC Adriatics
 
All about Office UI Fabric
All about Office UI FabricAll about Office UI Fabric
All about Office UI FabricFabio Franzini
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePointEric Overfield
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
Use the PnP SharePoint Starter Kit to create your intranet in a box
Use the PnP SharePoint Starter Kit to create your intranet in a boxUse the PnP SharePoint Starter Kit to create your intranet in a box
Use the PnP SharePoint Starter Kit to create your intranet in a boxFabio Franzini
 
SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012Thuan Ng
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end toolingThomas Daly
 

What's hot (20)

Broaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding optionsBroaden your dev skillset with SharePoint branding options
Broaden your dev skillset with SharePoint branding options
 
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)
 
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
 
An Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices ProjectAn Introduction to the Office 365 Patterns and Practices Project
An Introduction to the Office 365 Patterns and Practices Project
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx Extensions
 
All about SPFx
All about SPFxAll about SPFx
All about SPFx
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 development
 
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
 
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
 
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
ecs19 - Bill Ayers - RE-USE YOUR SHAREPOINT FRAMEWORK SKILLZ TO BUILD OFFICE ...
 
O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Getting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning EngineGetting started with the PnP Provisioning Engine
Getting started with the PnP Provisioning Engine
 
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
 
All about Office UI Fabric
All about Office UI FabricAll about Office UI Fabric
All about Office UI Fabric
 
Branding Modern SharePoint
Branding Modern SharePointBranding Modern SharePoint
Branding Modern SharePoint
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 DevelopmentSharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
 
Use the PnP SharePoint Starter Kit to create your intranet in a box
Use the PnP SharePoint Starter Kit to create your intranet in a boxUse the PnP SharePoint Starter Kit to create your intranet in a box
Use the PnP SharePoint Starter Kit to create your intranet in a box
 
SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012SharePoint Development with Visual Studio 2012
SharePoint Development with Visual Studio 2012
 
Branding office 365 with front end tooling
Branding office 365 with front end toolingBranding office 365 with front end tooling
Branding office 365 with front end tooling
 

Similar to Build Your First SharePoint Framework Webpart

How to convert your Full Trust Solutions to the 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)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webpartsPrabhu Nehru
 
Introduction to Office Development Topics
Introduction to Office Development TopicsIntroduction to Office Development Topics
Introduction to Office Development TopicsHaaron Gonzalez
 
How to convert your Full Trust Solutions to the 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)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialThomas Daly
 
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 SPFxNCCOMMS
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franzini
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio FranziniCCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franzini
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franziniwalk2talk srl
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSean McLellan
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsPablo Godel
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSébastien Levert
 
CICD with SharePoint SPFx A useful overview
CICD with SharePoint SPFx A useful overviewCICD with SharePoint SPFx A useful overview
CICD with SharePoint SPFx A useful overviewpdalian
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionThomas Daly
 
Spsnyc transforming share point farm solutions to the add-in model and shar...
Spsnyc   transforming share point farm solutions to the add-in model and shar...Spsnyc   transforming share point farm solutions to the add-in model and shar...
Spsnyc transforming share point farm solutions to the add-in model and shar...spsnyc
 
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 ServicesBrian Culver
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSébastien Levert
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourBrian Culver
 

Similar to Build Your First SharePoint Framework Webpart (20)

How to convert your Full Trust Solutions to the 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)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
Introduction to Office Development Topics
Introduction to Office Development TopicsIntroduction to Office Development Topics
Introduction to Office Development Topics
 
How to convert your Full Trust Solutions to the 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)
How to convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Introducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFxIntroducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFx
 
O365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - MaterialO365 Developer Bootcamp NJ 2018 - Material
O365 Developer Bootcamp NJ 2018 - Material
 
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
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franzini
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio FranziniCCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franzini
CCI 2017 - Introduzione a SharePoint Framework (SPFx) - Fabio Franzini
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
Rock Solid Deployment of Web Applications
Rock Solid Deployment of Web ApplicationsRock Solid Deployment of Web Applications
Rock Solid Deployment of Web Applications
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 developmentSPTechCon Austin 2019 - From SharePoint to Office 365 development
SPTechCon Austin 2019 - From SharePoint to Office 365 development
 
CICD with SharePoint SPFx A useful overview
CICD with SharePoint SPFx A useful overviewCICD with SharePoint SPFx A useful overview
CICD with SharePoint SPFx A useful overview
 
M365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx VersionM365 global developer bootcamp 2019 Intro to SPFx Version
M365 global developer bootcamp 2019 Intro to SPFx Version
 
Spsnyc transforming share point farm solutions to the add-in model and shar...
Spsnyc   transforming share point farm solutions to the add-in model and shar...Spsnyc   transforming share point farm solutions to the add-in model and shar...
Spsnyc transforming share point farm solutions to the add-in model and shar...
 
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
 
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest DC 2019 - From SharePoint to Office 365 Development
SharePoint Fest DC 2019 - From SharePoint to Office 365 Development
 
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 DevelopmentSharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
SharePoint Fest Seattle 2019 - From SharePoint to Office 365 Development
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hourConvert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
Convert your Full Trust Solutions to the SharePoint Framework (SPFx) in 1 hour
 

More from Eric Overfield

Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewEric Overfield
 
The Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowThe Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowEric Overfield
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopEric Overfield
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsEric Overfield
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean itEric Overfield
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationEric Overfield
 
Shape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileShape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileEric Overfield
 
The 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointThe 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointEric Overfield
 
The Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointThe Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointEric Overfield
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Eric Overfield
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEric Overfield
 
Enhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEnhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEric Overfield
 
Reshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesReshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesEric Overfield
 
SharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookSharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookEric Overfield
 

More from Eric Overfield (14)

Microsoft Ignite 2016 In Review
Microsoft Ignite 2016 In ReviewMicrosoft Ignite 2016 In Review
Microsoft Ignite 2016 In Review
 
The Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to KnowThe Future of SharePoint - What You Need to Know
The Future of SharePoint - What You Need to Know
 
Branding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - WorkshopBranding SharePoint from Prototype to Deployment - Workshop
Branding SharePoint from Prototype to Deployment - Workshop
 
Create your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page LayoutsCreate your own SharePoint Master Pages and Page Layouts
Create your own SharePoint Master Pages and Page Layouts
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean it
 
Your SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding InitiationYour SharePoint 2013 Branding Initiation
Your SharePoint 2013 Branding Initiation
 
Shape SharePoint 2013 for Mobile
Shape SharePoint 2013 for MobileShape SharePoint 2013 for Mobile
Shape SharePoint 2013 for Mobile
 
The 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePointThe 2013 Design Manager - From HTML to SharePoint
The 2013 Design Manager - From HTML to SharePoint
 
The Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePointThe Design Dilemma of Mobile and SharePoint
The Design Dilemma of Mobile and SharePoint
 
Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365Integrating Search Driven Content in SharePoint 2013/2016/O365
Integrating Search Driven Content in SharePoint 2013/2016/O365
 
Enhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web DesignEnhance SharePoint 2013 with Responsive Web Design
Enhance SharePoint 2013 with Responsive Web Design
 
Enhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web DesignEnhancing SharePoint with Responsive Web Design
Enhancing SharePoint with Responsive Web Design
 
Reshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet DevicesReshaping SharePoint for Evolving Internet Devices
Reshaping SharePoint for Evolving Internet Devices
 
SharePoint Branding - Change Your Look
SharePoint Branding - Change Your LookSharePoint Branding - Change Your Look
SharePoint Branding - Change Your Look
 

Recently uploaded

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Recently uploaded (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Build Your First SharePoint Framework Webpart

  • 1. BUILD YOUR FIRST SHAREPOINT FRAMEWORK WEBPART https://github.com/eoverfield/SPFx-Demos ERIC OVERFIELD | PixelMill Microsoft MVP & RD SharePoint Advocate & Enthusiast @ericoverfield
  • 2. ERIC OVERFIELD President & Co-Founder of PixelMill Microsoft MVP, Office Servers & Services Microsoft Regional Director Published SharePoint Author SharePoint Community Organizer & Contributor @ericoverfield ericoverfield.com
  • 3. PixelMill is a modern SharePoint Design Agency based in Northern California. On the forefront of web design trends since 1998, PixelMill provides innovative collaboration portals to enhance the user adoption of SharePoint intranets, extranets, and public facing sites. PIXELMILL @pixelmillteam pixelmill.com
  • 4. 1. SharePoint Framework (SPFx) Overview 2. SPFx Toolchain – the Build Environment 3. SPFx Webpart Components 4. Webpart Properties, Packaging & More OVERVIEW
  • 5. @ericoverfieldericoverfield.com HISTORY OF SHAREPOINT DEVELOPMENT MODELS 2013 APP/ADD-IN MODEL 2010 SANDBOX 2003 FULL TRUST 2016 CLOUD FRIENDLY SPFx
  • 6. A page and web part model with full support for client-side SharePoint development • Open source tooling / toolchain • nodeJS, npm, Yeoman, gulp, TypeScript, webpack and more • Easy integration with SharePoint data • Rest API wrapper classes • Available in the cloud and On-prem* • Generally available on SharePoint Online • On-prem availability scheduled for 2017 WHAT IS THE SHAREPOINT FRAMEWORK?
  • 7. SPFx – Welcome to integrated client-side rendering • Client-side rendering • No server side/compiled code / C# • IDE / Development platform agnostic • New / modern tool chain • nodeJS / Yeoman / Gulp / Reach / etc • Not dependent on JavaScript Injection • No iFrame • Direct integration with the page model HOW THE FRAMEWORK IS DIFFERENT
  • 9. THE SPFx TOOLCHAIN A DEVELOPMENT ENVIRONMENT
  • 10. • Office 365 / SharePoint Online tenant • App catalog for deployment • http://dev.office.com/sharepoint/docs/spfx/set-up-your-developer-tenant#create-app-catalog-site • Development workstation • PC / iOS / Linux – few limitations • Toolchain is open source – do not need a dedicated dev env • Much more simple than classic SharePoint Development PREREQUISITES
  • 11. • https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview • Use any most OS / workstation • Install nodeJS (current Long Term Support (LTS) version) • Yeoman and Gulp • C:> npm i –g yo gulp • SPFx Yeoman generator • C:> npm i –g @microsoft/generator-sharepoint • C:> npm update –g @microsoft/generator-sharepoint • Use code editor • VS Code / Sublime Text / NotePad++, etc A SHAREPOINT FRAMEWORK DEVELOPMENT ENVIRONMENT
  • 13. • C:> md helloworld-webpart • C:> cd helloworld-webpart • C:> yo @microsoft/sharepoint • Grab a cup of coffee – first time in a project, this will take a while • You can execute yo command again to add more webparts to project • Each addition of a webpart to a project will take much less time to scaffold • C:> gulp serve • Check out your first webpart! • It “should” be that simple • May also load in SPO workbench: https://”tenant”.sharepoint.com/sites/”site”/_layouts/15/workbench.aspx CREATE YOUR FIRST SPFx WEBPART
  • 15. WELCOME TO A NEW DEVELOPMENT PARADIGM
  • 16. WEBPART SOURCE OVERVIEW Get to know your Webpart folder structure • src: primary webpart TypeScript source code • config: json configuration files for build process • typings: TypeScript typings for JS libs – legacy • lib: Build files (TS compiled JS) ready for bundle • dist: Final web ready code for distribution • sharepoint: .spapp file for App Catalog • node_modules: NodeJS modules (JS) for toolchain
  • 17. @ericoverfieldericoverfield.com WEBPART PROPERTIES Webparts normally need custom properties • Webparts normally need custom properties • Define: /src/webparts/”webpart”/”webpart”Props.ts • Add in JSON • Default values: /src/webparts/”webpart”/”webpart”.manifest.json • Add in JSON: preconfiguredEntries.properties • Display: /src/webparts/”webpart”/”webpart”.ts • Method: protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {} • Override onchange: /src/webparts/”webpart”/”webpart”.ts • Method: public onPropertyPaneFieldChanged (propertyPath: string, oldValue: any , newValue: any) {}
  • 18. @ericoverfieldericoverfield.com ACCESS DYNAMIC DATA IN PROPERTY PANE • Method getPropertyPaneConfiguration returns a static IPropertyPaneConfiguration • Method does not allow for Promises / dynamic data • Solution: Load dynamic data within onPropertyPaneConfigurationStart() or onInit() then trigger pane refresh • this.context.propertyPane.refresh(); //cause pane to refresh with new data
  • 19. @ericoverfieldericoverfield.com CONNECT TO SHAREPOINT / DYNAMIC DATA • SPFx provides tools to quickly interact with external API data • TypeScript Http classes within @microsoft/sp-http • this.context always includes spHttpClient! • HttpClient • Basic set of features for REST operations with any external resource • SPHttpClient • REST calls against SharePoint • Handles context, security, etc. Could use HttpClient if desired import { SPHttpClient } from '@microsoft/sp-http'; this.context.spHttpClient.get(this.context.pageContext.web.absoluteUrl + `/_api/Lists/?$select=Id,Title&$filter=Hidden ne true`, SPHttpClient.configurations.v1) .then((response: SPHttpClientResponse) => { return response.json(); }); }
  • 21. PACKAGE YOUR WEBPART FOR DEPLOYMENT • Set deployment configuration • config/package-solution.json – general settings and package name • write-manifests.json – CDN / bundle location – for dev, can serve locally: gulp serve --nobrowser • C:> gulp clean (cleans sharepoint and temp folders) • C:> gulp build (Rebuilds the solution) • C:> gulp bundle (Creates the solution bundles) • C:> gulp package-solution (Creates /sharepoint/”webpart”.spapp) • C:> gulp –ship (minifies bundle and reads in CDN info from config/write-manifests.json) • C:> gulp package-solution --ship (Recreates /sharepoint/”webpart”.spapp with CDN info)
  • 22. PACKAGE YOUR WEBPART FOR DEPLOYMENT • After solution created, can then add to SharePoint • Add .spapp to app catalog • Add app to SharePoint site • Add webpart in site to content page • Webpart is still pointing to local host for JS • Configure CDN for full webpart deployment • https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/deploy-web-part-to-cdn • Or manually deploy solution bundle and config write-manifests.json
  • 24. CONNECT TO EXTERNAL LIBRARIES / FRAMEWORKS / RESOURCES • External libraries and component require Typings • i.e. for jQuery: • C:> npm install --save jquery • C:> npm install --save @types/jquery • Add to bundle – config/config.json "externals": { "jquery":"node_modules/jquery/dist/jquery.min.js“ }, • Within webpart • import * as myjQuery from 'jquery'; • Access: let $workspace: jQuery = myjQuery(‘#spPageChromeAppDiv');
  • 25. SPFx COMMAND REFERENCE • yo @microsoft/sharepoint // create a new base project • gulp serve // compile and start up local workbench • gulp serve --nobrowser // same as serve, but with no browser loaded • gulp package-solution // compile / create spapp file for redeployment in "Sharepoint" folder • gulp package-solution --ship // create minified component assets • gulp bundle // generate assets (js, css, etc) for deployment to CDN • gulp deploy-azure-storage // deploy assets to Azure storage as defined in config/deploy-azure- storage.json
  • 26. 1. Learn TypeScript! 2. Use SPHttpClient to connect to SharePoint • HttpClient for other API’s 3. Use frameworks and libraries that already has typings 4. Office UI Fabric available for consistent styling 5. Further Documentation Likely Exists • https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview RECOMMENDATIONS
  • 27. REVIEW 1. SharePoint Framework (SPFx) Overview 2. SPFx Toolchain – the Build Environment 3. SPFx Webpart Components 4. Webpart Properties, Packaging & More
  • 29. RESOURCES • SharePoint Framework documentation https://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview • SharePoint Framework API https://dev.office.com/sharepoint/reference/spfx/sharepoint-framework-reference-overview • Build your first webpart https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part • Add properties to a SPFx Webpart https://dev.office.com/sharepoint/docs/spfx/web-parts/basics/integrate-with-property-pane • Connect a SPFx webpart to SharePoint Data https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/connect-to-sharepoint • Webpart with React and Office UI Fabric https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/use-fabric-react-components • Get an introduction to the SharePoint Framework https://channel9.msdn.com/Events/Ignite/2016/BRK2114-TS • Demo Source Code https://github.com/eoverfield/SPFx-Demos
  • 30. THANK YOU BUILD YOUR FIRST SHAREPOINT FRAMEWORK WEBPART

Editor's Notes

  1. Slides will be available from blog and twitter Look at introduction webpart for SPFx Who has looked at the framework? Anyone install it already? You have the dev tenant configured? 101 level overview. Good demos of options but going to limit how deep we go right now. Lots of valuable resources at the end to help you with your journey
  2. https://channel9.msdn.com/Events/Ignite/2016/BRK2114-TS
  3. http://dev.office.com/sharepoint/docs/spfx/sharepoint-framework-overview Key features of the SharePoint Framework include: Runs in the context of the current user and connection in the browser. There are no iFrames. The controls are rendered in the normal page DOM. The controls are responsive and accessible by nature. Enables the developer to access the lifecycle - including, in addition to render - load, serialize and deserialize, configuration changes, and more. It's framework agnostic. You can use any browser framework that you like: React, Handlebars, Knockout, Angular, and more. The toolchain is based on common open source client development tools like npm, TypeScript, Yeoman, webpack, and gulp. Performance is reliable. 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. Solutions can be deployed in both classic web part and publishing pages and modern pages.
  4. http://sharepoint.handsontek.net/category/development/
  5. https://channel9.msdn.com/Events/Ignite/2016/BRK2114-TS
  6. NodeJS - root - current Long Term Support (LTS) version npm V3 npm -g install npm@3 On a PC, install windows-build-tools. will also install Python 2.7, needed for a few modules npm install --global --production windows-build-tools Need Yeoman generator npm i -g @microsoft/generator-sharepoint npm i -g @microsoft/generator-sharepoint@latest (to get latest)
  7. Look at developer tenant and dev env node –v gulp –v yo --generators code .
  8. Create our first SPFx webpart md helloworld-webpart cd helloworld-webpart yo @microsoft/sharepoint gulp serve Now open workbench in dev tenant, while local gulp is running
  9. Go to helloworld folder yo @microsoft/sharepoint --give a new webpart name gulp serve Also can load in SPO workbench /_layouts/15/workbench.aspx
  10. "jquery":"node_modules/jquery/dist/jquery.min.js", "jqueryui":"node_modules/jqueryui/jquery-ui.min.js"