SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Downloaden Sie, um offline zu lesen
SPFx Mark Rackley
mrackley@paitgroup.com
Converting Your CEWP Customizations to the
SharePoint Framework
© 2015 PAIT Group
Mark Rackley / Partner & CSO
‱ 20+ years software
architecture and
development experience
‱ Office 365 MVP, SharePoint
Junkie since 2007
‱ Event Organizer
(SharePointalooza.org)
‱ Blogger, Writer, Speaker
‱ Bacon aficionado
@mrackley
www.MarkRackley.net
www.PAITGroup.com
www.SharePointaLooza.org
www.StratusForms.com
#SayNoToInfoPath
© 2015 PAIT Group
WHAT’S UP WITH THIS SESSION?
© 2015 PAIT Group
WHAT’S UP WITH THIS SESSION?
Have existing jQuery/JavaScript solutions
Need to better understand the SharePoint Framework
Don’t know or don’t want to learn TypeScript
Don’t know or don’t want to learn React
Need to know how to get started
FOR CLIENT SIDE DEVELOPERS THAT

© 2015 PAIT Group
Goals for the Session
What is the
SharePoint
Framework?
Why do we
need the
SharePoint
Framework?
Converting a
Customization to
the SharePoint
Framework
© 2015 PAIT Group
WHAT IS THE SHAREPOINT FRAMEWORK (SPFx)
SharePoint framework
LOB Systems and Cloud Services
Microsoft Graph
(coming soon)
Modern client-side development
Lightweight web and mobile
Used to build Modern SharePoint Page
Backward compatible
Supports open source tools
and JavaScript web frameworks
© 2015 PAIT Group
THE SHAREPOINT FRAMEWORK
Finally! A management and deployment story for our client side web parts
Works in Classic and Modern Pages
Users can set properties instead of having to modify script
Local Workbench for development and debugging
TypeScript (if you are a .NET Dev)
You GET to learn new (marketable) skills
Mobile friendly
Works the same in On Premises and Online
GOOD
© 2015 PAIT Group
THE SHAREPOINT FRAMEWORK
The process can initially be daunting if you are a .NET developer (Change is hard)
TypeScript (If you are JavaScript developer)
Lack of Visual Studio Tooling
There is no store
You HAVE to learn new skills
WHAT HURDLES WILL YOU FACE?
© 2015 PAIT Group
JavaScript/HTML/CSS
An open mind (it’s a brave new world)
Node.js, NPM, Yeoman, Gulp??? (open source
FTW!)
TypeScript (Enterprise JavaScript
Development)
Office UI Fabric (Front-end visual Framework)
VisualStudio Code
SKILLS YOU NEED TO
EMBRACE
© 2015 PAIT Group
WHY DO YOU NEED THE SHAREPOINT
FRAMEWORK
© 2015 PAIT Group
WHY DO YOU NEED THE SHAREPOINT
FRAMEWORK
Stop polluting the global namespace
Better for the mobile application
Prevents non-devs from potential security
risks of putting unknown scripts on page
STOP SCRIPT INJECTION
© 2015 PAIT Group
WHY DO YOU NEED THE SHAREPOINT
FRAMEWORK
Stop polluting the global namespace
Better for the mobile framework
Prevents non-devs from potential security
risks of putting unknown scripts on page
STOP SCRIPT INJECTION
Create manageable projects for multiple devs
Deploy solutions easily to multiple sites or
pages
Use properties and keep users out of scripts
ENTERPRISE READY
DEMO: A CUSTOMIZATION WITHOUT THE SHAREPOINT
FRAMEWORK
DEMO: CONVERTING A CUSTOMIZATION TO THE
SHAREPOINT FRAMEWORK
SOURCE CODE:
HTTPS://GITHUB.COM/MRACKLEY/IGNITE2017
© 2015 PAIT Group
The Steps we walked through in the demo
1. Copy scripts and css files to your SPFx project
2. Add references to external scripts to Config.json
3. Import and add appropriate changes to the main .ts file
4. Take advantage of Properties to make your solution
configurable by the users
5. Package and deploy your solution
© 2015 PAIT Group
1. Copy script files to your SPFx project
‱ Copy your .js and your .css files to
/src/webparts/webPartName folder
‱ (Optional) Copy our third party files to the same location if
you do not wish to reference them via CDN.
© 2015 PAIT Group
2. Add references to Config.json
‱ Add to externals section of Config.json
‱ Add path to library
‱ Add globalName if other libraries are dependent
‱ Indicate globalDependies
© 2015 PAIT Group
2. Add references to Config.json
"jquery": {
"path": "https://code.jquery.com/jquery-1.12.4.min.js",
"globalName": "jQuery"
},
"flip": {
"path": "https://cdn.rawgit.com/nnattawat/flip/master/dist/jquery.flip.min.js",
"globalName": "jQuery",
"globalDependencies": ["jquery"]
}
© 2015 PAIT Group
3. Make changes to main.ts
Import externals
Add external css
Add local .js and .css files
Use the pageContext object instead of
_spPageContextInfo
© 2015 PAIT Group
Import externals
import 'jquery';
import 'flip';
declare var $;
© 2015 PAIT Group
Add external css
import {SPComponentLoader} from '@microsoft/sp-loader';
SPComponentLoader.loadCss("<url to css file>");
© 2015 PAIT Group
Add local .js and .css files
require('./PAITGroup.PromotedLinks.js');
require('./PAITGroup.PromotedLinks.css');
require('./masonry.pkgd.min.js');
© 2015 PAIT Group
Use the pageContext object
this.context.pageContext.site.absoluteUrl
© 2015 PAIT Group
4. Take advantage of properties
For the interface
/src/webparts/<project>/<project>WebPartPartProps.ts
For the labels in the property panel
/src/webparts/<project>/loc/en-us.js
/src/webparts/<projct>/mystrings.d.ts
For default values
/src/webparts/<project>/<project>WebPart.manifest.json
To create the property panel
/src/webparts/<project>/<project>WebPart.ts
A COUPLE OF OTHER POTENTIAL HURDLES
© 2015 PAIT Group
Use REST to get the Form Digest if needed
var getDigestCall =
$.ajax({
url: <site url> + '/_api/contextinfo',
method: "POST",
headers: { "Accept": "application/json; odata=verbose" }
})
data.d.GetContextWebInformation.FormDigestValue
© 2015 PAIT Group
Disable reactive property changes
protected get disableReactivePropertyChanges(): boolean {
return true;
}
© 2015 PAIT Group
5. Package and deploy your solution
‱ Update “cdnBasePath” in writes-manifest.json
‱ gulp bundle –ship
‱ gulp package-solution –ship
‱ Upload files in /temp/deploy to CDN location
‱ Upload app package at /sharepoint/solution to app catalog
Deploy your SharePoint client-side web part to a Azure Storage
account
https://dev.office.com/sharepoint/docs/spfx/web-parts/get-
started/deploy-web-part-to-cdn
Thank you
http://www.paitgroup.com
http://www.markrackley.net
mrackley@paitgroup.com
@mrackley
© 2016 PAIT Group http://www.PAITGroup.com December 14,2016

Weitere Àhnliche Inhalte

Was ist angesagt?

Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013
SharePointRadi
 
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
NCCOMMS
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
NCCOMMS
 
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael GrethO365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
NCCOMMS
 

Was ist angesagt? (20)

Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013
 
SPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint DevelopersSPUnite17 TypeScript for SharePoint Developers
SPUnite17 TypeScript for SharePoint Developers
 
Microsoft Teams as a Development Platform
Microsoft Teams as a Development PlatformMicrosoft Teams as a Development Platform
Microsoft Teams as a Development Platform
 
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
O365Con18 - Customizing SharePoint and Microsoft Teams with SharePoint Framew...
 
O365Con18 - New Era of Customizing - Olli Jaaskelainen
O365Con18 - New Era of Customizing - Olli JaaskelainenO365Con18 - New Era of Customizing - Olli Jaaskelainen
O365Con18 - New Era of Customizing - Olli Jaaskelainen
 
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
ECS19 - Vesa Juvonen - SharePoint Development for Enterprises - What's New an...
 
Azure Web Jobs
Azure Web JobsAzure Web Jobs
Azure Web Jobs
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
 
Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)Introduction to SharePoint Framework (SPFx)
Introduction to SharePoint Framework (SPFx)
 
[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...
 
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
 
Improving the SharePoint Development Process with Continuous Integration
Improving the SharePoint Development Process with Continuous IntegrationImproving the SharePoint Development Process with Continuous Integration
Improving the SharePoint Development Process with Continuous Integration
 
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael GrethO365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
O365Con18 - Best Practice with Company Video on Microsoft Stream - Michael Greth
 
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
 
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
 
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
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
CDNs para el SharePoint Framework (SPFx)
CDNs para el SharePoint Framework (SPFx)CDNs para el SharePoint Framework (SPFx)
CDNs para el SharePoint Framework (SPFx)
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
 

Andere mochten auch

SpUnite17 Exploring Identity Management Options in Office 365
SpUnite17 Exploring Identity Management Options in Office 365SpUnite17 Exploring Identity Management Options in Office 365
SpUnite17 Exploring Identity Management Options in Office 365
NCCOMMS
 
SPUnite17 Successful SharePoint Projects and User eXperience
SPUnite17 Successful SharePoint Projects and User eXperienceSPUnite17 Successful SharePoint Projects and User eXperience
SPUnite17 Successful SharePoint Projects and User eXperience
NCCOMMS
 
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
 

Andere mochten auch (14)

SPUnite17 5 More Query Rules
SPUnite17 5 More Query RulesSPUnite17 5 More Query Rules
SPUnite17 5 More Query Rules
 
SPUnite17 SharePoint and Data Loss Prevention
SPUnite17 SharePoint and Data Loss PreventionSPUnite17 SharePoint and Data Loss Prevention
SPUnite17 SharePoint and Data Loss Prevention
 
SPUnite17 Deep Dive Building Solutions
SPUnite17 Deep Dive Building SolutionsSPUnite17 Deep Dive Building Solutions
SPUnite17 Deep Dive Building Solutions
 
SPUnite17 Getting Notified by SharePoint with WebHooks
SPUnite17 Getting Notified by SharePoint with WebHooksSPUnite17 Getting Notified by SharePoint with WebHooks
SPUnite17 Getting Notified by SharePoint with WebHooks
 
SPUnite17 Making Sense of the SharePoint Framework
SPUnite17 Making Sense of the SharePoint FrameworkSPUnite17 Making Sense of the SharePoint Framework
SPUnite17 Making Sense of the SharePoint Framework
 
SpUnite17 Exploring Identity Management Options in Office 365
SpUnite17 Exploring Identity Management Options in Office 365SpUnite17 Exploring Identity Management Options in Office 365
SpUnite17 Exploring Identity Management Options in Office 365
 
SPUnite17 Getting up to Speed with React
SPUnite17 Getting up to Speed with ReactSPUnite17 Getting up to Speed with React
SPUnite17 Getting up to Speed with React
 
SPUnite17 Successful SharePoint Projects and User eXperience
SPUnite17 Successful SharePoint Projects and User eXperienceSPUnite17 Successful SharePoint Projects and User eXperience
SPUnite17 Successful SharePoint Projects and User eXperience
 
SPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You WantSPUnite17 Who Are You and What Do You Want
SPUnite17 Who Are You and What Do You Want
 
SPUnite17 Modern NewsPublishing with SharePoint
SPUnite17 Modern NewsPublishing with SharePointSPUnite17 Modern NewsPublishing with SharePoint
SPUnite17 Modern NewsPublishing with SharePoint
 
SPUnite17 Large Lists in SharePoint
SPUnite17 Large Lists in SharePointSPUnite17 Large Lists in SharePoint
SPUnite17 Large Lists in SharePoint
 
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
 
SPUnite17 Introducing Logic Apps
SPUnite17 Introducing Logic AppsSPUnite17 Introducing Logic Apps
SPUnite17 Introducing Logic Apps
 
SPUnite17 External Sharing in SharePoint Online
SPUnite17 External Sharing in SharePoint OnlineSPUnite17 External Sharing in SharePoint Online
SPUnite17 External Sharing in SharePoint Online
 

Ähnlich wie Spunite17 Converting your CEWP Customisations

The art of .net deployment automation
The art of .net deployment automationThe art of .net deployment automation
The art of .net deployment automation
MidVision
 
CVCC - Data Visualization and VisiFire
CVCC - Data Visualization and VisiFireCVCC - Data Visualization and VisiFire
CVCC - Data Visualization and VisiFire
ryanaoliveira
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
Mark Rackley
 

Ähnlich wie Spunite17 Converting your CEWP Customisations (20)

Utilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done FasterUtilizing jQuery in SharePoint: Get More Done Faster
Utilizing jQuery in SharePoint: Get More Done Faster
 
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)
 
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)
 
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
 
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)
 
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
Que hay de nuevo en Visual Studio 2013 y ASP.NET 5.1
 
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
 
Overview and Walkthrough of the Application Programming Model with SAP Cloud ...
Overview and Walkthrough of the Application Programming Model with SAP Cloud ...Overview and Walkthrough of the Application Programming Model with SAP Cloud ...
Overview and Walkthrough of the Application Programming Model with SAP Cloud ...
 
The art of .net deployment automation
The art of .net deployment automationThe art of .net deployment automation
The art of .net deployment automation
 
ASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big DealASP.NET 5: What's the Big Deal
ASP.NET 5: What's the Big Deal
 
How You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in ProductionHow You Convince Your Manager To Adopt Scala.js in Production
How You Convince Your Manager To Adopt Scala.js in Production
 
Django app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh AgarwalDjango app deployment in Azure By Saurabh Agarwal
Django app deployment in Azure By Saurabh Agarwal
 
CVCC - Data Visualization and VisiFire
CVCC - Data Visualization and VisiFireCVCC - Data Visualization and VisiFire
CVCC - Data Visualization and VisiFire
 
Extending SAP SuccessFactors in the Cloud and how not to do it
Extending SAP SuccessFactors in the Cloud and how not to do itExtending SAP SuccessFactors in the Cloud and how not to do it
Extending SAP SuccessFactors in the Cloud and how not to do it
 
SharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFXSharePoint Conference North America - Converting your JavaScript to SPFX
SharePoint Conference North America - Converting your JavaScript to SPFX
 
Hands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.comHands-on Workshop: Intermediate Development with Heroku and Force.com
Hands-on Workshop: Intermediate Development with Heroku and Force.com
 
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)
 
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...
 
HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3 HP Helion European Webinar Series ,Webinar #3
HP Helion European Webinar Series ,Webinar #3
 
Laravel CI / CD in Azure Web Apps - Global Azure Bootcamp Jakarta
Laravel CI / CD in Azure Web Apps -  Global Azure Bootcamp JakartaLaravel CI / CD in Azure Web Apps -  Global Azure Bootcamp Jakarta
Laravel CI / CD in Azure Web Apps - Global Azure Bootcamp Jakarta
 

Mehr von NCCOMMS

Mehr von NCCOMMS (20)

O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
O365Con19 - UI:UX 101 Learn How to Design Custom Experiences for SharePoint -...
 
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick BakkerO365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
O365Con19 - Model-driven Apps or Canvas Apps? - Rick Bakker
 
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper OosterveldO365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
O365Con19 - Office 365 Groups Surviving the Real World - Jasper Oosterveld
 
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis JugoO365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
O365Con19 - Developing Timerjob and Eventhandler Equivalents - Adis Jugo
 
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis JugoO365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
O365Con19 - Sharepoint with (Artificial) Intelligence - Adis Jugo
 
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul HuntO365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
O365Con19 - What Do You Mean 90 days Isn't Enough - Paul Hunt
 
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
O365Con19 - Tips and Tricks for Complex Migrations to SharePoint Online - And...
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
 
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
O365Con19 - Start Your Journey from Skype for Business to Teams - Sasja Beere...
 
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi RoineO365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
O365Con19 - Lets Get Started with Azure Container Instances - Jussi Roine
 
O365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi RoineO365Con19 - Azure Blackbelt - Jussi Roine
O365Con19 - Azure Blackbelt - Jussi Roine
 
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna LinsO365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
O365Con19 - Customise the UI in Modern SharePoint Workspaces - Corinna Lins
 
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna LinsO365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
O365Con19 - Be The Protagonist of Your Modern Workplace - Corinna Lins
 
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
O365Con19 - How to Really Manage all your Tasks Across Microsoft 365 - Luise ...
 
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio StruyfO365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
O365Con19 - Sharing Code Efficiently in your Organisation - Elio Struyf
 
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
O365Con19 - Things I've Learned While Building a Product on SharePoint Modern...
 
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de JagerO365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
O365Con19 - Keep Control of Your Data with AIP and CA - Bram de Jager
 
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van RousseltO365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
O365Con19 - Kaizala a Dive Into the Unknown - Rick van Rousselt
 
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise FreeseO365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
O365Con19 - How to Inspire Users to Unstick from Email - Luise Freese
 
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris GoosenO365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
O365Con19 - O365 Identity Management and The Golden Config - Chris Goosen
 

KĂŒrzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

KĂŒrzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Spunite17 Converting your CEWP Customisations

  • 1.
  • 2. SPFx Mark Rackley mrackley@paitgroup.com Converting Your CEWP Customizations to the SharePoint Framework
  • 3. © 2015 PAIT Group Mark Rackley / Partner & CSO ‱ 20+ years software architecture and development experience ‱ Office 365 MVP, SharePoint Junkie since 2007 ‱ Event Organizer (SharePointalooza.org) ‱ Blogger, Writer, Speaker ‱ Bacon aficionado @mrackley www.MarkRackley.net www.PAITGroup.com www.SharePointaLooza.org www.StratusForms.com #SayNoToInfoPath
  • 4. © 2015 PAIT Group WHAT’S UP WITH THIS SESSION?
  • 5. © 2015 PAIT Group WHAT’S UP WITH THIS SESSION? Have existing jQuery/JavaScript solutions Need to better understand the SharePoint Framework Don’t know or don’t want to learn TypeScript Don’t know or don’t want to learn React Need to know how to get started FOR CLIENT SIDE DEVELOPERS THAT

  • 6. © 2015 PAIT Group Goals for the Session What is the SharePoint Framework? Why do we need the SharePoint Framework? Converting a Customization to the SharePoint Framework
  • 7. © 2015 PAIT Group WHAT IS THE SHAREPOINT FRAMEWORK (SPFx) SharePoint framework LOB Systems and Cloud Services Microsoft Graph (coming soon) Modern client-side development Lightweight web and mobile Used to build Modern SharePoint Page Backward compatible Supports open source tools and JavaScript web frameworks
  • 8. © 2015 PAIT Group THE SHAREPOINT FRAMEWORK Finally! A management and deployment story for our client side web parts Works in Classic and Modern Pages Users can set properties instead of having to modify script Local Workbench for development and debugging TypeScript (if you are a .NET Dev) You GET to learn new (marketable) skills Mobile friendly Works the same in On Premises and Online GOOD
  • 9. © 2015 PAIT Group THE SHAREPOINT FRAMEWORK The process can initially be daunting if you are a .NET developer (Change is hard) TypeScript (If you are JavaScript developer) Lack of Visual Studio Tooling There is no store You HAVE to learn new skills WHAT HURDLES WILL YOU FACE?
  • 10. © 2015 PAIT Group JavaScript/HTML/CSS An open mind (it’s a brave new world) Node.js, NPM, Yeoman, Gulp??? (open source FTW!) TypeScript (Enterprise JavaScript Development) Office UI Fabric (Front-end visual Framework) VisualStudio Code SKILLS YOU NEED TO EMBRACE
  • 11. © 2015 PAIT Group WHY DO YOU NEED THE SHAREPOINT FRAMEWORK
  • 12. © 2015 PAIT Group WHY DO YOU NEED THE SHAREPOINT FRAMEWORK Stop polluting the global namespace Better for the mobile application Prevents non-devs from potential security risks of putting unknown scripts on page STOP SCRIPT INJECTION
  • 13. © 2015 PAIT Group WHY DO YOU NEED THE SHAREPOINT FRAMEWORK Stop polluting the global namespace Better for the mobile framework Prevents non-devs from potential security risks of putting unknown scripts on page STOP SCRIPT INJECTION Create manageable projects for multiple devs Deploy solutions easily to multiple sites or pages Use properties and keep users out of scripts ENTERPRISE READY
  • 14. DEMO: A CUSTOMIZATION WITHOUT THE SHAREPOINT FRAMEWORK
  • 15. DEMO: CONVERTING A CUSTOMIZATION TO THE SHAREPOINT FRAMEWORK SOURCE CODE: HTTPS://GITHUB.COM/MRACKLEY/IGNITE2017
  • 16. © 2015 PAIT Group The Steps we walked through in the demo 1. Copy scripts and css files to your SPFx project 2. Add references to external scripts to Config.json 3. Import and add appropriate changes to the main .ts file 4. Take advantage of Properties to make your solution configurable by the users 5. Package and deploy your solution
  • 17. © 2015 PAIT Group 1. Copy script files to your SPFx project ‱ Copy your .js and your .css files to /src/webparts/webPartName folder ‱ (Optional) Copy our third party files to the same location if you do not wish to reference them via CDN.
  • 18. © 2015 PAIT Group 2. Add references to Config.json ‱ Add to externals section of Config.json ‱ Add path to library ‱ Add globalName if other libraries are dependent ‱ Indicate globalDependies
  • 19. © 2015 PAIT Group 2. Add references to Config.json "jquery": { "path": "https://code.jquery.com/jquery-1.12.4.min.js", "globalName": "jQuery" }, "flip": { "path": "https://cdn.rawgit.com/nnattawat/flip/master/dist/jquery.flip.min.js", "globalName": "jQuery", "globalDependencies": ["jquery"] }
  • 20. © 2015 PAIT Group 3. Make changes to main.ts Import externals Add external css Add local .js and .css files Use the pageContext object instead of _spPageContextInfo
  • 21. © 2015 PAIT Group Import externals import 'jquery'; import 'flip'; declare var $;
  • 22. © 2015 PAIT Group Add external css import {SPComponentLoader} from '@microsoft/sp-loader'; SPComponentLoader.loadCss("<url to css file>");
  • 23. © 2015 PAIT Group Add local .js and .css files require('./PAITGroup.PromotedLinks.js'); require('./PAITGroup.PromotedLinks.css'); require('./masonry.pkgd.min.js');
  • 24. © 2015 PAIT Group Use the pageContext object this.context.pageContext.site.absoluteUrl
  • 25. © 2015 PAIT Group 4. Take advantage of properties For the interface /src/webparts/<project>/<project>WebPartPartProps.ts For the labels in the property panel /src/webparts/<project>/loc/en-us.js /src/webparts/<projct>/mystrings.d.ts For default values /src/webparts/<project>/<project>WebPart.manifest.json To create the property panel /src/webparts/<project>/<project>WebPart.ts
  • 26. A COUPLE OF OTHER POTENTIAL HURDLES
  • 27. © 2015 PAIT Group Use REST to get the Form Digest if needed var getDigestCall = $.ajax({ url: <site url> + '/_api/contextinfo', method: "POST", headers: { "Accept": "application/json; odata=verbose" } }) data.d.GetContextWebInformation.FormDigestValue
  • 28. © 2015 PAIT Group Disable reactive property changes protected get disableReactivePropertyChanges(): boolean { return true; }
  • 29. © 2015 PAIT Group 5. Package and deploy your solution ‱ Update “cdnBasePath” in writes-manifest.json ‱ gulp bundle –ship ‱ gulp package-solution –ship ‱ Upload files in /temp/deploy to CDN location ‱ Upload app package at /sharepoint/solution to app catalog Deploy your SharePoint client-side web part to a Azure Storage account https://dev.office.com/sharepoint/docs/spfx/web-parts/get- started/deploy-web-part-to-cdn