SlideShare a Scribd company logo
30th September 2017
Milan
30th September 2017
Milan
SharePoint Framework tips & tricks
Giuseppe Marchi, Dev4Side S.r.l.
www.peppedotnet.it
www.office365italia.com
Hi, my name is Peppe!
• Co-founder of Dev4Side S.r.l.
• 8 years Microsoft SharePoint MVP
• Speaker in Microsoft communities events in Italy
• "SharePointer" from 2005
• Father of www.peppedotnet.it 
• Office 365 advisor for www.office365italia.com
• Author of the book "Pocket C#" from Apogeo
• One of the top SharePoint and Office 365
influencers (for 2014 and 2015)
#SPSMilan
A Huge “Thank You!” To Our Sponsors …
In cooperation with
A Huge “Thank You!” To Our Sponsors …
In cooperation with
A special “Thank you!” to us 
A complete offer for the adoption of Microsoft
cloud collaboration products
TRAINING
video courses
webinars
on-site classes
ADVICE
development
support
maintenance
FREE STUFF
guides
news
webinars
A Huge “Thank You!” To Our Sponsors …
In cooperation with
A special “Thank you!” to us 
Ready-to-go apps for SharePoint and Office 365
A Huge “Thank You!” To Our Sponsors …
In cooperation with
A special “Thank you!” to us 
SharePoint Framework training
We are planning some SharePoint Framework trainings.
Are you interested?
If so, please fill this form: http://bit.ly/corso-spfx
Agenda
• Tips and tricks for …
• Working with Web Part properties
• Manage dependencies
• Make the right choices for your solution
• Choose the right options for your dev environment
• Upgrades and automation
Before starting…
A true story from a SharePoint developer
Yyeeeeeessssssssss,
finally some
updates for
developers!!!!
Hey guys, there’s a
new development
model for
SharePoint!
No problem, I
became a
Javascript ninja
during these years!
It’s all about
client-side
development
Ah..Ehmm.. You’ll
have to use
Typescript, not
Javascript
Uhm.. But I can
reuse my skills as a
SharePoint
developer, correct?
And also NodeJs,
npm, Yeoman,
Webpack, Gulp,
React, Redux,
Code, and others
…
Ah..Yes.. REST APIs,
some provisioning
and … ehmm..
No please… code
from Pialorsi will
have tons of bug
for sure!!
…. I’m gonna lose
my job :(
But don’t worry..
You have the
community that
can help you!
Don’t panic! Because I’ve …
15 tips to survive during
your SharePoint Framework
adoption!
Translation: some useful information to speed up your SharePoint Framework
projects…
Manage updates to
properties values
Reactive properties within SPFx
Reactive properties withing React components
#01
Don’t use text field for
numeric properties!
Remember: you’re using Javascript and in Javascript, with strings, the following
sentence is true 1 + 1 = 11 (thx to Waldek Mastykarz)
Use SliderPropertyField or https://oliviercc.github.io/sp-client-custom-fields/
#02
Add metadata to your Web
Part properties.
Define additional metadata to integrate properties with SharePoint
Enable search indexing, link fixing and removing unsafe HTML
Note: only works with SharePoint Online modern UI pages
#03
Are you using Angular?
Remember to bootstrap it
only once!
render() method is called many times in a Client Side Web Part
This is the same also for external scripts/styles
#04
How to reference images
Even simple tasks could be a nightmare somethimes…
#05
Use dummy data and mocks
during UI implementation
The local workbench is awesome for UI development, but you need data …
#06
Remember to download
references when you git pull a
SPFx project from repo, for the
first time
Working in team on a SPFx solution: use npm install to download references
Dependencies are not inside the repository
#07
Always use --save when
you’re adding dependency
to SPFx solution
"In my environment it works…«
The same is for uninstall a package
#08
Reference external
frameworks from CDN!
Don’t bundle external frameworks
Keep your eyes on package size
#09
Lock your dependencies
when you release!
Use the npm shrinkwrap command to froze the dependencies tree of your solution
In this way you can recreate the exact build you’re shipping
#10
Use external custom APIs
for privileges evelevation
Azure web apps are your friends as SPUtility.RunWithElevatedPrivileges in a farm
solution
#11
External APIs for privileges elevation
SharePoint Online Client side web part
Custom API
LOAD JS FILES IFRAME FOR GETTING AUTH
TOKEN FROM API WEBSITE
THEN, ASK FOR ADMIN ACTION
DO THE ADMIN ACTION
THIS CAN BE EITHER INSIDE SHAREPOINT ONLINE
SECURED WITH
AUTHENTICATION + CORS
Note: in the next version of SPFx this will be inside the libraries from Microsoft, using adal.js
Use a CDN for your
solution, only if you need it!
Is a CDN always the best solution for an SPFx web part?
#12
When using a CDN makes sense?
• Having scripts inside a CDN makes a big
difference for organizations with locations in
several geographies
• SharePoint Online is your CDN!
https://dev.office.com/blogs/general-availability-of-office-365-cdn
Increase solution version
for upgrading a SPFx
solution in prod
The same as you’re doing with SharePoint Addins
#13
Here how you can upgrade a solution:
• Build and deploy your scripts
• gulp build --ship
• Notice that in /temp/deploy you now have 1more .js file!
• Increase the solution version in package-solution.json
• Build new package
• gulp package-solution --ship
• Overwrite the package in the app catalog
• Refresh the page with web part to see changes
Automate tasks for scripts
and package deployment
npm install gulp-spsync-creds node-sppkg-deploy –save (super thanks to Elio Struyf)
Then update your gulpfile.js
#14
Use a specific version of the
SPFx Yeoman generator for
each project!
Avoid problems for adding new artifacts inside an old SPFx solution
Try new SPFx versions without affecting your actual projects
Build Web Parts for both SharePoint Online and on-premises
#15
Use a specific version of the SPFx Yo
• Here the options for isolating your projects and their toolchain:
• Use a virtual machine for each version of SPFx Yo (not so usefull…)
• Use Docker containers
• https://blog.mastykarz.nl/sharepoint-framework-docker/
• Use NVM (Node Version Manager)
• Use NPX (NPM package runner)
• npx -p yo -p @microsoft/generator-sharepoint@latest -- yo
@microsoft/sharepoint
• Install SPFx Yo to project’s dev dependencies
• npm i @microsoft/generator-sharepoint –D
• Then lock your dependencies
QUESTIONS&
ANSWERS
Thank You!
Please fill the feedback form!
PEPPEDOTNET.IT
SOURCE CODE ON HTTPS://GITHUB.COM/PEPPEDOTNET
30th September 2017
Milan
30th September 2017
Milan

More Related Content

What's hot

Don't use create react app
Don't use create react appDon't use create react app
Don't use create react app
Nikhil Kumaran S
 
.NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10).NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10)
Alex Pshul
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
Pronovix
 
Build 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual StudioBuild 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual Studio
Windows Developer
 
O365Con18 - Yo I want to extend - Stefan Bauer
O365Con18 - Yo I want to extend - Stefan BauerO365Con18 - Yo I want to extend - Stefan Bauer
O365Con18 - Yo I want to extend - Stefan Bauer
NCCOMMS
 
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
VMware Tanzu
 
SPFx (SharePoint Framework)
SPFx (SharePoint Framework)SPFx (SharePoint Framework)
SPFx (SharePoint Framework)
Małgorzata Borzęcka
 
Developer cloud roadmap keynote
Developer cloud roadmap keynoteDeveloper cloud roadmap keynote
Developer cloud roadmap keynote
Moaid Hathot
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - WebtaskalifragilistexpialidociousTomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - Webtaskalifragilistexpialidocious
ServerlessConf
 
What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?Robert MacLean
 
Idea to production
Idea to productionIdea to production
Idea to production
Roi Ezra
 
Building a DevOps Pipeline using Docker Images & Containers
Building a DevOps Pipeline using Docker Images & ContainersBuilding a DevOps Pipeline using Docker Images & Containers
Building a DevOps Pipeline using Docker Images & Containers
Amal Dev
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons Learned
Pronovix
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
Kirti Prajapati
 
Vue js & vue cli 3 plugins to boost up the performance of your application
Vue js & vue cli 3 plugins to boost up the performance of your applicationVue js & vue cli 3 plugins to boost up the performance of your application
Vue js & vue cli 3 plugins to boost up the performance of your application
Katy Slemon
 
An overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantagesAn overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantages
Pronovix
 
Building CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless ApplicationsBuilding CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless Applications
Daniel Zivkovic
 
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas sparkSalesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Aldo Fernandez
 

What's hot (18)

Don't use create react app
Don't use create react appDon't use create react app
Don't use create react app
 
.NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10).NET MAUI with .NET 6 (December 2021, Preview 10)
.NET MAUI with .NET 6 (December 2021, Preview 10)
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
Build 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual StudioBuild 2017 - B8083 - The future of Visual Studio
Build 2017 - B8083 - The future of Visual Studio
 
O365Con18 - Yo I want to extend - Stefan Bauer
O365Con18 - Yo I want to extend - Stefan BauerO365Con18 - Yo I want to extend - Stefan Bauer
O365Con18 - Yo I want to extend - Stefan Bauer
 
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
 
SPFx (SharePoint Framework)
SPFx (SharePoint Framework)SPFx (SharePoint Framework)
SPFx (SharePoint Framework)
 
Developer cloud roadmap keynote
Developer cloud roadmap keynoteDeveloper cloud roadmap keynote
Developer cloud roadmap keynote
 
Tomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - WebtaskalifragilistexpialidociousTomasz Janczuk - Webtaskalifragilistexpialidocious
Tomasz Janczuk - Webtaskalifragilistexpialidocious
 
What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?What’s new in LightSwitch 2013?
What’s new in LightSwitch 2013?
 
Idea to production
Idea to productionIdea to production
Idea to production
 
Building a DevOps Pipeline using Docker Images & Containers
Building a DevOps Pipeline using Docker Images & ContainersBuilding a DevOps Pipeline using Docker Images & Containers
Building a DevOps Pipeline using Docker Images & Containers
 
API SDK Development – Lessons Learned
API SDK Development – Lessons LearnedAPI SDK Development – Lessons Learned
API SDK Development – Lessons Learned
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
 
Vue js & vue cli 3 plugins to boost up the performance of your application
Vue js & vue cli 3 plugins to boost up the performance of your applicationVue js & vue cli 3 plugins to boost up the performance of your application
Vue js & vue cli 3 plugins to boost up the performance of your application
 
An overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantagesAn overview of devportal technologies and their (dis)advantages
An overview of devportal technologies and their (dis)advantages
 
Building CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless ApplicationsBuilding CI/CD Pipelines for Serverless Applications
Building CI/CD Pipelines for Serverless Applications
 
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas sparkSalesforce1 dev week UYSDUG 2014 - the force canvas spark
Salesforce1 dev week UYSDUG 2014 - the force canvas spark
 

Similar to SharePoint Framework tips and tricks

UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!
René Winkelmeyer
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
Ivo Jansch
 
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
 
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
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
Suresh Patidar
 
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Eric Shupps
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
Steven Pousty
 
NLLUG 2012 - XPages Extensibility API - going deep!
NLLUG 2012 - XPages Extensibility API - going deep!NLLUG 2012 - XPages Extensibility API - going deep!
NLLUG 2012 - XPages Extensibility API - going deep!
René Winkelmeyer
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
Steven Pousty
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
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
Thomas Daly
 
The happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and MindfulnessThe happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and Mindfulness
Olli Jääskeläinen
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
European Collaboration Summit
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
Sean Coates
 
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
 
Lean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partnerLean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partner
Bill Scott
 
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
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
Xebia IT Architects
 
Sppp presentation
Sppp presentationSppp presentation
Sppp presentation
Denis Molodtsov
 

Similar to SharePoint Framework tips and tricks (20)

UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!UKLUG 2012 - XPages Extensibility API - going deep!
UKLUG 2012 - XPages Extensibility API - going deep!
 
Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)Enterprise PHP (PHP London Conference 2008)
Enterprise PHP (PHP London Conference 2008)
 
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)
 
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)
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
Developing SharePoint Framework Solutions for the Enterprise (SPC 2019)
 
OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012OpenShift with Eclipse Tooling - EclipseCon 2012
OpenShift with Eclipse Tooling - EclipseCon 2012
 
NLLUG 2012 - XPages Extensibility API - going deep!
NLLUG 2012 - XPages Extensibility API - going deep!NLLUG 2012 - XPages Extensibility API - going deep!
NLLUG 2012 - XPages Extensibility API - going deep!
 
Free Mongo on OpenShift
Free Mongo on OpenShiftFree Mongo on OpenShift
Free Mongo on OpenShift
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem. SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
 
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
 
The happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and MindfulnessThe happy developer - SharePoint Framework React and Mindfulness
The happy developer - SharePoint Framework React and Mindfulness
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer30 Skills to Master to Become a Senior Software Engineer
30 Skills to Master to Become a Senior Software Engineer
 
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)
 
Lean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partnerLean Engineering: How to make Engineering a full Lean UX partner
Lean Engineering: How to make Engineering a full Lean UX partner
 
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)
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
Sppp presentation
Sppp presentationSppp presentation
Sppp presentation
 

More from Giuseppe Marchi

Wiriting applications for Microsoft Teams
Wiriting applications for Microsoft TeamsWiriting applications for Microsoft Teams
Wiriting applications for Microsoft Teams
Giuseppe Marchi
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016
Giuseppe Marchi
 
Prepararsi a spostare le proprie applicazioni share point su office 365
Prepararsi a spostare le proprie applicazioni share point su office 365Prepararsi a spostare le proprie applicazioni share point su office 365
Prepararsi a spostare le proprie applicazioni share point su office 365
Giuseppe Marchi
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
Giuseppe Marchi
 
SharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricksSharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricks
Giuseppe Marchi
 
Apps for SharePoint Online 2013
Apps for SharePoint Online 2013Apps for SharePoint Online 2013
Apps for SharePoint Online 2013
Giuseppe Marchi
 
Sviluppare App per Office 2013 e SharePoint 2013
Sviluppare App per Office 2013 e SharePoint 2013Sviluppare App per Office 2013 e SharePoint 2013
Sviluppare App per Office 2013 e SharePoint 2013Giuseppe Marchi
 
Sp real world solutions - field permissions
Sp real world solutions - field permissionsSp real world solutions - field permissions
Sp real world solutions - field permissionsGiuseppe Marchi
 
Introduction to Umbraco
Introduction to UmbracoIntroduction to Umbraco
Introduction to Umbraco
Giuseppe Marchi
 
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
Giuseppe Marchi
 
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
Giuseppe Marchi
 
Introduzione a SharePoint Online (Microsoft Community Tour)
Introduzione a SharePoint Online (Microsoft Community Tour)Introduzione a SharePoint Online (Microsoft Community Tour)
Introduzione a SharePoint Online (Microsoft Community Tour)
Giuseppe Marchi
 

More from Giuseppe Marchi (12)

Wiriting applications for Microsoft Teams
Wiriting applications for Microsoft TeamsWiriting applications for Microsoft Teams
Wiriting applications for Microsoft Teams
 
What's new in SharePoint 2016
What's new in SharePoint 2016What's new in SharePoint 2016
What's new in SharePoint 2016
 
Prepararsi a spostare le proprie applicazioni share point su office 365
Prepararsi a spostare le proprie applicazioni share point su office 365Prepararsi a spostare le proprie applicazioni share point su office 365
Prepararsi a spostare le proprie applicazioni share point su office 365
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
 
SharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricksSharePoint 2013 REST API tips & tricks
SharePoint 2013 REST API tips & tricks
 
Apps for SharePoint Online 2013
Apps for SharePoint Online 2013Apps for SharePoint Online 2013
Apps for SharePoint Online 2013
 
Sviluppare App per Office 2013 e SharePoint 2013
Sviluppare App per Office 2013 e SharePoint 2013Sviluppare App per Office 2013 e SharePoint 2013
Sviluppare App per Office 2013 e SharePoint 2013
 
Sp real world solutions - field permissions
Sp real world solutions - field permissionsSp real world solutions - field permissions
Sp real world solutions - field permissions
 
Introduction to Umbraco
Introduction to UmbracoIntroduction to Umbraco
Introduction to Umbraco
 
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
Integrazione tra SharePoint 2010 e Windows Azure (Azure Day)
 
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
Introduzione a SharePoint 2010 per sviluppatori (.NET Campus 2011)
 
Introduzione a SharePoint Online (Microsoft Community Tour)
Introduzione a SharePoint Online (Microsoft Community Tour)Introduzione a SharePoint Online (Microsoft Community Tour)
Introduzione a SharePoint Online (Microsoft Community Tour)
 

Recently uploaded

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
laozhuseo02
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
TristanJasperRamos
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
natyesu
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Sanjeev Rampal
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
laozhuseo02
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
JungkooksNonexistent
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
nirahealhty
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
ShahulHameed54211
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
Himani415946
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 

Recently uploaded (16)

The+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptxThe+Prospects+of+E-Commerce+in+China.pptx
The+Prospects+of+E-Commerce+in+China.pptx
 
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptxLiving-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
Living-in-IT-era-Module-7-Imaging-and-Design-for-Social-Impact.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
BASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptxBASIC C++ lecture NOTE C++ lecture 3.pptx
BASIC C++ lecture NOTE C++ lecture 3.pptx
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesMulti-cluster Kubernetes Networking- Patterns, Projects and Guidelines
Multi-cluster Kubernetes Networking- Patterns, Projects and Guidelines
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shopHistory+of+E-commerce+Development+in+China-www.cfye-commerce.shop
History+of+E-commerce+Development+in+China-www.cfye-commerce.shop
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Latest trends in computer networking.pptx
Latest trends in computer networking.pptxLatest trends in computer networking.pptx
Latest trends in computer networking.pptx
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!This 7-second Brain Wave Ritual Attracts Money To You.!
This 7-second Brain Wave Ritual Attracts Money To You.!
 
Output determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CCOutput determination SAP S4 HANA SAP SD CC
Output determination SAP S4 HANA SAP SD CC
 
ER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAEER(Entity Relationship) Diagram for online shopping - TAE
ER(Entity Relationship) Diagram for online shopping - TAE
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 

SharePoint Framework tips and tricks

  • 1. 30th September 2017 Milan 30th September 2017 Milan
  • 2. SharePoint Framework tips & tricks Giuseppe Marchi, Dev4Side S.r.l. www.peppedotnet.it www.office365italia.com
  • 3. Hi, my name is Peppe! • Co-founder of Dev4Side S.r.l. • 8 years Microsoft SharePoint MVP • Speaker in Microsoft communities events in Italy • "SharePointer" from 2005 • Father of www.peppedotnet.it  • Office 365 advisor for www.office365italia.com • Author of the book "Pocket C#" from Apogeo • One of the top SharePoint and Office 365 influencers (for 2014 and 2015)
  • 5. A Huge “Thank You!” To Our Sponsors … In cooperation with
  • 6. A Huge “Thank You!” To Our Sponsors … In cooperation with A special “Thank you!” to us  A complete offer for the adoption of Microsoft cloud collaboration products TRAINING video courses webinars on-site classes ADVICE development support maintenance FREE STUFF guides news webinars
  • 7. A Huge “Thank You!” To Our Sponsors … In cooperation with A special “Thank you!” to us  Ready-to-go apps for SharePoint and Office 365
  • 8. A Huge “Thank You!” To Our Sponsors … In cooperation with A special “Thank you!” to us  SharePoint Framework training We are planning some SharePoint Framework trainings. Are you interested? If so, please fill this form: http://bit.ly/corso-spfx
  • 9. Agenda • Tips and tricks for … • Working with Web Part properties • Manage dependencies • Make the right choices for your solution • Choose the right options for your dev environment • Upgrades and automation
  • 11. A true story from a SharePoint developer
  • 12. Yyeeeeeessssssssss, finally some updates for developers!!!! Hey guys, there’s a new development model for SharePoint!
  • 13. No problem, I became a Javascript ninja during these years! It’s all about client-side development
  • 14. Ah..Ehmm.. You’ll have to use Typescript, not Javascript
  • 15. Uhm.. But I can reuse my skills as a SharePoint developer, correct? And also NodeJs, npm, Yeoman, Webpack, Gulp, React, Redux, Code, and others …
  • 16. Ah..Yes.. REST APIs, some provisioning and … ehmm..
  • 17. No please… code from Pialorsi will have tons of bug for sure!! …. I’m gonna lose my job :( But don’t worry.. You have the community that can help you!
  • 19. 15 tips to survive during your SharePoint Framework adoption! Translation: some useful information to speed up your SharePoint Framework projects…
  • 20. Manage updates to properties values Reactive properties within SPFx Reactive properties withing React components #01
  • 21. Don’t use text field for numeric properties! Remember: you’re using Javascript and in Javascript, with strings, the following sentence is true 1 + 1 = 11 (thx to Waldek Mastykarz) Use SliderPropertyField or https://oliviercc.github.io/sp-client-custom-fields/ #02
  • 22. Add metadata to your Web Part properties. Define additional metadata to integrate properties with SharePoint Enable search indexing, link fixing and removing unsafe HTML Note: only works with SharePoint Online modern UI pages #03
  • 23. Are you using Angular? Remember to bootstrap it only once! render() method is called many times in a Client Side Web Part This is the same also for external scripts/styles #04
  • 24. How to reference images Even simple tasks could be a nightmare somethimes… #05
  • 25. Use dummy data and mocks during UI implementation The local workbench is awesome for UI development, but you need data … #06
  • 26. Remember to download references when you git pull a SPFx project from repo, for the first time Working in team on a SPFx solution: use npm install to download references Dependencies are not inside the repository #07
  • 27. Always use --save when you’re adding dependency to SPFx solution "In my environment it works…« The same is for uninstall a package #08
  • 28. Reference external frameworks from CDN! Don’t bundle external frameworks Keep your eyes on package size #09
  • 29. Lock your dependencies when you release! Use the npm shrinkwrap command to froze the dependencies tree of your solution In this way you can recreate the exact build you’re shipping #10
  • 30. Use external custom APIs for privileges evelevation Azure web apps are your friends as SPUtility.RunWithElevatedPrivileges in a farm solution #11
  • 31. External APIs for privileges elevation SharePoint Online Client side web part Custom API LOAD JS FILES IFRAME FOR GETTING AUTH TOKEN FROM API WEBSITE THEN, ASK FOR ADMIN ACTION DO THE ADMIN ACTION THIS CAN BE EITHER INSIDE SHAREPOINT ONLINE SECURED WITH AUTHENTICATION + CORS Note: in the next version of SPFx this will be inside the libraries from Microsoft, using adal.js
  • 32. Use a CDN for your solution, only if you need it! Is a CDN always the best solution for an SPFx web part? #12
  • 33. When using a CDN makes sense? • Having scripts inside a CDN makes a big difference for organizations with locations in several geographies • SharePoint Online is your CDN! https://dev.office.com/blogs/general-availability-of-office-365-cdn
  • 34. Increase solution version for upgrading a SPFx solution in prod The same as you’re doing with SharePoint Addins #13
  • 35. Here how you can upgrade a solution: • Build and deploy your scripts • gulp build --ship • Notice that in /temp/deploy you now have 1more .js file! • Increase the solution version in package-solution.json • Build new package • gulp package-solution --ship • Overwrite the package in the app catalog • Refresh the page with web part to see changes
  • 36. Automate tasks for scripts and package deployment npm install gulp-spsync-creds node-sppkg-deploy –save (super thanks to Elio Struyf) Then update your gulpfile.js #14
  • 37. Use a specific version of the SPFx Yeoman generator for each project! Avoid problems for adding new artifacts inside an old SPFx solution Try new SPFx versions without affecting your actual projects Build Web Parts for both SharePoint Online and on-premises #15
  • 38. Use a specific version of the SPFx Yo • Here the options for isolating your projects and their toolchain: • Use a virtual machine for each version of SPFx Yo (not so usefull…) • Use Docker containers • https://blog.mastykarz.nl/sharepoint-framework-docker/ • Use NVM (Node Version Manager) • Use NPX (NPM package runner) • npx -p yo -p @microsoft/generator-sharepoint@latest -- yo @microsoft/sharepoint • Install SPFx Yo to project’s dev dependencies • npm i @microsoft/generator-sharepoint –D • Then lock your dependencies
  • 40. Thank You! Please fill the feedback form! PEPPEDOTNET.IT SOURCE CODE ON HTTPS://GITHUB.COM/PEPPEDOTNET
  • 41. 30th September 2017 Milan 30th September 2017 Milan

Editor's Notes

  1. https://blog.mastykarz.nl/correctly-reference-images-sharepoint-framework-solutions/
  2. https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-sp-elevatedprivileges