SlideShare a Scribd company logo
aOS Luxembourg
4 décembre 2017
SharePoint & JavaScript – Modern Development
Christopher Clément
@ChrisClement_BE
Yannick Plenevaux
@yp_code
aOS Luxembourg
4 décembre 2017
Yannick Plenevaux
SharePoint & Office 365 Consultant
MCSD App Builder
iKe Consulting
@ yannick.plenevaux@gmail.com
@yp_code
https://ypcode.wordpress.com
Christopher Clément
Business Analyst – SharePoint Specialist
MCPD – MCITP – Former MVP
iKe Consulting
@ clem.christopher@gmail.com
@ChrisClement_BE
https://christopherclementen.wordpress.com
aOS Luxembourg
4 décembre 2017
Agenda
• History of SharePoint development
• Why JavaScript ?
• General JavaScript concerns
• SharePoint Framework
• SharePoint & JavaScript concerns
• SharePoint & JavaScript embedding
• JavaScript & Permissions
• Q&A
aOS Luxembourg
4 décembre 2017
SharePoint development - History
Farm Solutions
• Globally deployed
• Fully trusted
• Server-side code (.NET)
• Within SharePoint
process (W3WP)
2007
• Sandboxed Solutions
• Locally deployed
• Restricted privileges
• Limited Server-side
code (.NET)
• Sandboxed process
• CSOM
• JSOM
• ListData.svc
2010 2013 2016
• REST API
• JSLink, CSR
• SharePoint Hosted Add-in’s
• In SP
• HTML5 apps
• Isolated
• JSOM, REST
• Provider Hosted Add-in’s
• Outside of SP
• CSOM, REST
• Any
Language/Platform
SharePoint Framework (SPFx)
• WebParts and Extensions
• Client Side (Browser)
• REST
• Targets Modern UI
• Modern Toolchain
• Common structure
• JS deployed by Admin
aOS Luxembourg
4 décembre 2017
SharePoint Add-ins
• Specific permissions are granted to Add-ins
• Full Page mode or “embedded” in SharePoint pages through Iframe’s
• SharePoint Hosted
• Hosted within the SharePoint farm/tenant
• HTML5 applications (JS Only , JSOM, REST API)
• Isolated using different domain name
• Seems there is no more investment from Microsoft
• Provider Hosted
• Hosted on a third-party provider
• Authenticated via Azure ACS/AAD (Low Trust) or Server-to-Server trust (High Trust)
• Can consist in only a Web API
• Can be developed with any technology (C#, NodeJS, PHP, Python, …)
aOS Luxembourg
4 décembre 2017
SharePoint Framework (SPFx)
• Client Side
• Develop WebParts or extend SharePoint UI
• Uses Modern Toolchain (NodeJS, TypeScript, Gulp, Yeoman, …)
• Defines a common way for JS development on SharePoint
• JS Applications must be trusted and deployed by administrators
• SharePoint Online:
• GA since beginning 2017
• Fully available for Modern UI and partially for Classic UI (Only WebParts)
• SharePoint 2016:
• Partially available since September 2017 with FP2
• Only WebParts on Classic UI
aOS Luxembourg
4 décembre 2017
What is JavaScript ?
• A scripting language driving the behavior of the browser
• Manipulates the DOM
• Handle user events (click, mouse move, scroll, …)
• JavaScript has NOTHING to do with Java
• Marketing agreement between Netscape and Sun
• First shipped with Netscape browser in 1996
• Normalized through ECMAScript
• Quickly implemented in all major browsers
• Single-threaded
• The same Thread handles UI and business logic
• Event-driven & Asynchronous
• Not initially designed for complex applications
aOS Luxembourg
4 décembre 2017
Why JavaScript ?
• Better UI and UX
• No page reload
• Dynamic input controls
• Real time form validation
• Responsive User Experience
• User friendly
• Is supported by every current browsers
• No need for plugins (Flash and Silverlight are dead… RIP ! )
• There is a browser running JavaScript on every smartphone and tablet
nowadays
aOS Luxembourg
4 décembre 2017
General JavaScript concerns
• Weakly typed script language
 TypeScript
• Dependencies nightmare
 Webpack
• No defined project structure
 Yeoman
• No build and ALM tools
 Gulp
aOS Luxembourg
4 décembre 2017
Other SPFx advantages
• A common framework with base and utility classes
• A development Workbench available locally or hosted on SharePoint
• SharePoint is not required to develop the UX and UI of WebParts
• JavaScript bundle can be hosted anywhere (CDN or SharePoint)
• Native support of Office UI Fabric styling and components
• Native support for localized resources
• Integrated unit testing tooling (Chai/Mocha)
• Integrated CSS scalability tooling (Sass)
• Dynamic, responsive and sexy Property Pane
• Development can be done with any IDE, on any OS
• Can leverage any existing JS Framework
• Every JS developer can easily become a SharePoint developer
aOS Luxembourg
4 décembre 2017
SPFx - an unknown world ?
Almost every new technology matches a well known one in our
beloved SharePoint/.NET development world
aOS Luxembourg
4 décembre 2017
DEMO 1
Develop with SPFx
aOS Luxembourg
4 décembre 2017
SharePoint & JavaScript concerns
• The JS application will interact with SharePoint through REST API (or
JSOM)
 Will have the permissions of the current user.
A JavaScript application will never be able to do, on its own, more than
what the current user is allowed to
BUT
will be able to use the current user permissions to do something
unexpected
aOS Luxembourg
4 décembre 2017
SharePoint & JavaScript concerns
• JavaScript can be embedded within
SharePoint pages and be executed
on the behalf of any users that will
visit the page
• Who is able to embed scripts ?
 Any user that has the Add
and Customize Pages permission
• Some use cases could have
been forgotten
• Some users can have bad intent
aOS Luxembourg
4 décembre 2017
DEMO 2
Malicious Script
aOS Luxembourg
4 décembre 2017
SharePoint & JavaScript embedding
• JavaScript embedding is ALWAYS
DISABLED on Modern UI
• JavaScript embedding can be turned off
on Classic UI
 Will impact several built-in
components such as
• Search WebParts
• Content Rollup
• Document Sets
• …
• SPFx packages are deployed via app
catalog by administrators
• Administrators are always aware of
what can be executed on their tenant
aOS Luxembourg
4 décembre 2017
DEMO 3
Deploy SPFx solutions
aOS Luxembourg
4 décembre 2017
JavaScript & Permissions
• We might need our application to do more than what the user is
allowed to
 we must delegate the job to a trusted third-party
• The third-party is authorized through App-Only permissions
• In the context of SharePoint Online, an Azure Function is a good
option
• SharePoint Online always has an underlying Azure AD, the logged-in user can
easily authenticate against the Azure Function
• Azure Functions limit the maintenance and running costs
• Azure Functions can be written in several languages
• Azure Functions can be replaced by any third party if better suited
aOS Luxembourg
4 décembre 2017
DEMO 4
Delegate to Azure Functions
aOS Luxembourg
4 décembre 2017
Summary
• JavaScript is probably the best choice for responsive and user
friendly UI in browser
• SPFx IS the way to go for modern development in SharePoint
• Add-ins (Provider Hosted) will remain in shapes of APIs or full
external applications interacting with SharePoint
• Azure Functions are a good fit to implement Server-side code
on Serverless architecture (handled authentication with Azure
AD)
• Custom APIs communicating with SharePoint can be hosted on
any platform in any technology (through REST API)
aOS Luxembourg
4 décembre 2017
Questions ?
aOS Luxembourg
4 décembre 2017
Thank you !
aOS Luxembourg
4 décembre 2017
References
• https://support.office.com/en-us/article/Allow-or-prevent-
custom-script-1f2c515f-5d7e-448a-9fd7-835da935584f?ui=en-
US&rs=en-US&ad=US
• https://support.office.com/en-us/article/Security-
considerations-of-allowing-custom-script-b0420ab0-aff2-4bbc-
bf5e-03de9719627c
• https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-
parts/guidance/connect-to-api-secured-with-aad
• https://aka.ms/sppnp
aOS Luxembourg
4 décembre 2017
Merci à notre sponsor !

More Related Content

What's hot (20)

PDF
What is OneDrive for Business and What Does it Do?
ShareGate
 
PDF
Building the Perfect Office 365 Tenant
BIWUG
 
PPTX
Let's do PowerBi - Together
BIWUG
 
PDF
Microsoft OneDrive For Business
David J Rosenthal
 
PDF
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
BIWUG
 
PPTX
OneDrive for Business 101
François Souyri
 
PDF
2016 12-05 aOS Brussels - Latest wonders of SharePoint and Office 365
Patrick Guimonet
 
PPTX
Managing OneDrive for Business
Peter Schmidt
 
PDF
2019-05-16 aOS Luxembourg - 2 - Intelligent acceleration of daily work woth O...
aOS Community
 
PDF
Office 365, Practical Adoption Strategies
BIWUG
 
PDF
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
NCCOMMS
 
PPTX
Next Gen Portal in Office 365: April 2015. SUGUK
pearce.alex
 
PDF
Good to Great SharePoint Governance
NCCOMMS
 
PDF
Google Analytics for Charities
Cliff Ashcroft
 
PDF
Collab365 - [FRENCH] Nouvelles options pour SharePoint 2016 et Office 365 c’e...
Patrick Guimonet
 
PDF
OneDrive to Rule Them All
Aptera Inc
 
PPTX
SharePoint User Group UK #FutureOfSharePoint 11 May 2016
pearce.alex
 
PPTX
Microsoft Flow advanced: tips, pitfalls, problems and warnings to be known be...
BIWUG
 
PDF
O365Engage17 - Modern collaboration in teams and projects powered by office 365
NCCOMMS
 
PDF
Todo lo que no sabías sobre Office 365
Arsys
 
What is OneDrive for Business and What Does it Do?
ShareGate
 
Building the Perfect Office 365 Tenant
BIWUG
 
Let's do PowerBi - Together
BIWUG
 
Microsoft OneDrive For Business
David J Rosenthal
 
Yo Office! Use your SPFx Skills to Build Add-Ins for Word, Excel, Outlook and...
BIWUG
 
OneDrive for Business 101
François Souyri
 
2016 12-05 aOS Brussels - Latest wonders of SharePoint and Office 365
Patrick Guimonet
 
Managing OneDrive for Business
Peter Schmidt
 
2019-05-16 aOS Luxembourg - 2 - Intelligent acceleration of daily work woth O...
aOS Community
 
Office 365, Practical Adoption Strategies
BIWUG
 
O365Con19 - Start Developing Teams Tabs and SharePoint Webparts with SPFX - O...
NCCOMMS
 
Next Gen Portal in Office 365: April 2015. SUGUK
pearce.alex
 
Good to Great SharePoint Governance
NCCOMMS
 
Google Analytics for Charities
Cliff Ashcroft
 
Collab365 - [FRENCH] Nouvelles options pour SharePoint 2016 et Office 365 c’e...
Patrick Guimonet
 
OneDrive to Rule Them All
Aptera Inc
 
SharePoint User Group UK #FutureOfSharePoint 11 May 2016
pearce.alex
 
Microsoft Flow advanced: tips, pitfalls, problems and warnings to be known be...
BIWUG
 
O365Engage17 - Modern collaboration in teams and projects powered by office 365
NCCOMMS
 
Todo lo que no sabías sobre Office 365
Arsys
 

Similar to SharePoint et Javascript - Modern development - Yannick Plenevaux - Christopher Clément (20)

PPTX
SPFx- A modern development model for SharePoint
Kirti Prajapati
 
PPTX
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 
PPTX
SharePoint development 2017 wrap-up
Joel Rodrigues
 
PPTX
SPTechCon Austin 2019 - From SharePoint to Office 365 development
Sébastien Levert
 
PPTX
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
Sébastien Levert
 
PPTX
SharePoint Framework tips and tricks
Giuseppe Marchi
 
PPTX
Deep dive into share point framework webparts
Prabhu Nehru
 
PDF
SPUnite17 Building Great Client Side Web Parts with SPFx
NCCOMMS
 
PPTX
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
Vincent Biret
 
PPTX
VJCD2017 SharePoint Framework (SPFx)
Seiji Noro
 
PPTX
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
Sébastien Levert
 
PDF
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
Bill Ayers
 
PDF
D1 - Building Great Client-side Web Parts with SPFx, PnP-JS-Core, ReactJS and...
SPS Paris
 
PPTX
ESPC Webinar - From SharePoint to Office 365 Development
Sébastien Levert
 
PPTX
What's new and what's next in SharePoint Development for Enterprise & SPFx
Vignesh Ganesan I Microsoft MVP
 
PPTX
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
PDF
Real World SharePoint Framework and Azure Services
Brian Culver
 
PPTX
#SPSToronto 2018 migrate you custom development to the SharePoint Framework
Vincent Biret
 
PPTX
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
Sébastien Levert
 
PPTX
Sp sat philly2019
Peter_1020
 
SPFx- A modern development model for SharePoint
Kirti Prajapati
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 
SharePoint development 2017 wrap-up
Joel Rodrigues
 
SPTechCon Austin 2019 - From SharePoint to Office 365 development
Sébastien Levert
 
SharePoint Fest Seattle 2018 - From SharePoint to Office 365 Development
Sébastien Levert
 
SharePoint Framework tips and tricks
Giuseppe Marchi
 
Deep dive into share point framework webparts
Prabhu Nehru
 
SPUnite17 Building Great Client Side Web Parts with SPFx
NCCOMMS
 
#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
Vincent Biret
 
VJCD2017 SharePoint Framework (SPFx)
Seiji Noro
 
SharePoint Fest Chicago 2019 - From SharePoint to Office 365 Development
Sébastien Levert
 
SPS Paris: Building great client-side web parts with spfx, pnp-js-core, React...
Bill Ayers
 
D1 - Building Great Client-side Web Parts with SPFx, PnP-JS-Core, ReactJS and...
SPS Paris
 
ESPC Webinar - From SharePoint to Office 365 Development
Sébastien Levert
 
What's new and what's next in SharePoint Development for Enterprise & SPFx
Vignesh Ganesan I Microsoft MVP
 
Building Responsive Intranet using Sharepoint Framework solutions - Asish Pad...
Asish Padhy
 
Real World SharePoint Framework and Azure Services
Brian Culver
 
#SPSToronto 2018 migrate you custom development to the SharePoint Framework
Vincent Biret
 
SharePoint Saturday Calgary 2017 - From SharePoint to Office 365 Development
Sébastien Levert
 
Sp sat philly2019
Peter_1020
 
Ad

More from aOS Community (20)

PPTX
Commencer le IaaS sur Azure - aOS Tahiti 03-03-2020
aOS Community
 
PPTX
Migrer vers O365. Quelles stragtégies? - aOS Tahiti 03-03-2020
aOS Community
 
PPTX
Passer des macro Excel à la power plateform - aOS Tahiti 03-03-2020
aOS Community
 
PDF
Serverless avec azure functions - aOS Tahiti 03-03-2020
aOS Community
 
PPTX
Passer des macro Excel à la power plateform - aOS Nouméa 28-02-2020
aOS Community
 
PDF
MS ignite : les nouveautés autour des content services et projet cortex - aOS...
aOS Community
 
PDF
Cybersecurité dans M365 - aOS Noumea 28-02-2020
aOS Community
 
PDF
Introduction a Power Automate - aOS Nouméa 28-02-2020
aOS Community
 
PDF
aOS Monaco 2019 - S3 - Présentation Varonis - Cloud Data Protection - Benjami...
aOS Community
 
PDF
aOS Monaco 2019 - S2 - Présentation ARKADIN - TEAMS Adoption - Laurent Pilo
aOS Community
 
PDF
aOS Monaco 2019 - C1 - Sécuriser sa messagerie sur Office 365 - Hakim Taoussi...
aOS Community
 
PDF
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
aOS Community
 
PDF
aOS Monaco 2019 - B6 - Mister Governance and Doctor Teams - Jean-François Ber...
aOS Community
 
PDF
aOS Monaco 2019 - B5 - The good, the bad and the unexpected - a BOT story - K...
aOS Community
 
PDF
aOS Monaco 2019 - B4 - Three must have workflows with Microsoft Flow - Vlad C...
aOS Community
 
PDF
aOS Monaco 2019 - B3 - Create purchase request in PowerApps - Robi Voncina
aOS Community
 
PDF
aOS Monaco 2019 - B2 - Intégrer la Power Platform avec SharePoint - Patrick G...
aOS Community
 
PDF
aOS Monaco 2019 - B1 - Construire son infrastructure sur Azure un jeu d'enfan...
aOS Community
 
PDF
aOS Monaco 2019 - A7 - Sécurisez votre SI et vos services Office 365 partie 2...
aOS Community
 
PDF
aOS Monaco 2019 - A6 - Sécurisez votre SI et vos services Office 365 partie 1...
aOS Community
 
Commencer le IaaS sur Azure - aOS Tahiti 03-03-2020
aOS Community
 
Migrer vers O365. Quelles stragtégies? - aOS Tahiti 03-03-2020
aOS Community
 
Passer des macro Excel à la power plateform - aOS Tahiti 03-03-2020
aOS Community
 
Serverless avec azure functions - aOS Tahiti 03-03-2020
aOS Community
 
Passer des macro Excel à la power plateform - aOS Nouméa 28-02-2020
aOS Community
 
MS ignite : les nouveautés autour des content services et projet cortex - aOS...
aOS Community
 
Cybersecurité dans M365 - aOS Noumea 28-02-2020
aOS Community
 
Introduction a Power Automate - aOS Nouméa 28-02-2020
aOS Community
 
aOS Monaco 2019 - S3 - Présentation Varonis - Cloud Data Protection - Benjami...
aOS Community
 
aOS Monaco 2019 - S2 - Présentation ARKADIN - TEAMS Adoption - Laurent Pilo
aOS Community
 
aOS Monaco 2019 - C1 - Sécuriser sa messagerie sur Office 365 - Hakim Taoussi...
aOS Community
 
aOS Monaco 2019 - B7 - I Developed a SPFx solution, what to do next and how t...
aOS Community
 
aOS Monaco 2019 - B6 - Mister Governance and Doctor Teams - Jean-François Ber...
aOS Community
 
aOS Monaco 2019 - B5 - The good, the bad and the unexpected - a BOT story - K...
aOS Community
 
aOS Monaco 2019 - B4 - Three must have workflows with Microsoft Flow - Vlad C...
aOS Community
 
aOS Monaco 2019 - B3 - Create purchase request in PowerApps - Robi Voncina
aOS Community
 
aOS Monaco 2019 - B2 - Intégrer la Power Platform avec SharePoint - Patrick G...
aOS Community
 
aOS Monaco 2019 - B1 - Construire son infrastructure sur Azure un jeu d'enfan...
aOS Community
 
aOS Monaco 2019 - A7 - Sécurisez votre SI et vos services Office 365 partie 2...
aOS Community
 
aOS Monaco 2019 - A6 - Sécurisez votre SI et vos services Office 365 partie 1...
aOS Community
 
Ad

Recently uploaded (20)

PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PPTX
Wondershare Filmora Crack Free Download 2025
josanj305
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
PDF
Home Cleaning App Development Services.pdf
V3cube
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
99 Bottles of Trust on the Wall — Operational Principles for Trust in Cyber C...
treyka
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
NASA A Researcher’s Guide to International Space Station : Fundamental Physics
Dr. PANKAJ DHUSSA
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Manual Testing for Accessibility Enhancement
Julia Undeutsch
 
Digital Circuits, important subject in CS
contactparinay1
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
Wondershare Filmora Crack Free Download 2025
josanj305
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Talbott's brief History of Computers for CollabDays Hamburg 2025
Talbott Crowell
 
Home Cleaning App Development Services.pdf
V3cube
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 

SharePoint et Javascript - Modern development - Yannick Plenevaux - Christopher Clément

  • 1. aOS Luxembourg 4 décembre 2017 SharePoint & JavaScript – Modern Development Christopher Clément @ChrisClement_BE Yannick Plenevaux @yp_code
  • 2. aOS Luxembourg 4 décembre 2017 Yannick Plenevaux SharePoint & Office 365 Consultant MCSD App Builder iKe Consulting @ [email protected] @yp_code https://ypcode.wordpress.com Christopher Clément Business Analyst – SharePoint Specialist MCPD – MCITP – Former MVP iKe Consulting @ [email protected] @ChrisClement_BE https://christopherclementen.wordpress.com
  • 3. aOS Luxembourg 4 décembre 2017 Agenda • History of SharePoint development • Why JavaScript ? • General JavaScript concerns • SharePoint Framework • SharePoint & JavaScript concerns • SharePoint & JavaScript embedding • JavaScript & Permissions • Q&A
  • 4. aOS Luxembourg 4 décembre 2017 SharePoint development - History Farm Solutions • Globally deployed • Fully trusted • Server-side code (.NET) • Within SharePoint process (W3WP) 2007 • Sandboxed Solutions • Locally deployed • Restricted privileges • Limited Server-side code (.NET) • Sandboxed process • CSOM • JSOM • ListData.svc 2010 2013 2016 • REST API • JSLink, CSR • SharePoint Hosted Add-in’s • In SP • HTML5 apps • Isolated • JSOM, REST • Provider Hosted Add-in’s • Outside of SP • CSOM, REST • Any Language/Platform SharePoint Framework (SPFx) • WebParts and Extensions • Client Side (Browser) • REST • Targets Modern UI • Modern Toolchain • Common structure • JS deployed by Admin
  • 5. aOS Luxembourg 4 décembre 2017 SharePoint Add-ins • Specific permissions are granted to Add-ins • Full Page mode or “embedded” in SharePoint pages through Iframe’s • SharePoint Hosted • Hosted within the SharePoint farm/tenant • HTML5 applications (JS Only , JSOM, REST API) • Isolated using different domain name • Seems there is no more investment from Microsoft • Provider Hosted • Hosted on a third-party provider • Authenticated via Azure ACS/AAD (Low Trust) or Server-to-Server trust (High Trust) • Can consist in only a Web API • Can be developed with any technology (C#, NodeJS, PHP, Python, …)
  • 6. aOS Luxembourg 4 décembre 2017 SharePoint Framework (SPFx) • Client Side • Develop WebParts or extend SharePoint UI • Uses Modern Toolchain (NodeJS, TypeScript, Gulp, Yeoman, …) • Defines a common way for JS development on SharePoint • JS Applications must be trusted and deployed by administrators • SharePoint Online: • GA since beginning 2017 • Fully available for Modern UI and partially for Classic UI (Only WebParts) • SharePoint 2016: • Partially available since September 2017 with FP2 • Only WebParts on Classic UI
  • 7. aOS Luxembourg 4 décembre 2017 What is JavaScript ? • A scripting language driving the behavior of the browser • Manipulates the DOM • Handle user events (click, mouse move, scroll, …) • JavaScript has NOTHING to do with Java • Marketing agreement between Netscape and Sun • First shipped with Netscape browser in 1996 • Normalized through ECMAScript • Quickly implemented in all major browsers • Single-threaded • The same Thread handles UI and business logic • Event-driven & Asynchronous • Not initially designed for complex applications
  • 8. aOS Luxembourg 4 décembre 2017 Why JavaScript ? • Better UI and UX • No page reload • Dynamic input controls • Real time form validation • Responsive User Experience • User friendly • Is supported by every current browsers • No need for plugins (Flash and Silverlight are dead… RIP ! ) • There is a browser running JavaScript on every smartphone and tablet nowadays
  • 9. aOS Luxembourg 4 décembre 2017 General JavaScript concerns • Weakly typed script language  TypeScript • Dependencies nightmare  Webpack • No defined project structure  Yeoman • No build and ALM tools  Gulp
  • 10. aOS Luxembourg 4 décembre 2017 Other SPFx advantages • A common framework with base and utility classes • A development Workbench available locally or hosted on SharePoint • SharePoint is not required to develop the UX and UI of WebParts • JavaScript bundle can be hosted anywhere (CDN or SharePoint) • Native support of Office UI Fabric styling and components • Native support for localized resources • Integrated unit testing tooling (Chai/Mocha) • Integrated CSS scalability tooling (Sass) • Dynamic, responsive and sexy Property Pane • Development can be done with any IDE, on any OS • Can leverage any existing JS Framework • Every JS developer can easily become a SharePoint developer
  • 11. aOS Luxembourg 4 décembre 2017 SPFx - an unknown world ? Almost every new technology matches a well known one in our beloved SharePoint/.NET development world
  • 12. aOS Luxembourg 4 décembre 2017 DEMO 1 Develop with SPFx
  • 13. aOS Luxembourg 4 décembre 2017 SharePoint & JavaScript concerns • The JS application will interact with SharePoint through REST API (or JSOM)  Will have the permissions of the current user. A JavaScript application will never be able to do, on its own, more than what the current user is allowed to BUT will be able to use the current user permissions to do something unexpected
  • 14. aOS Luxembourg 4 décembre 2017 SharePoint & JavaScript concerns • JavaScript can be embedded within SharePoint pages and be executed on the behalf of any users that will visit the page • Who is able to embed scripts ?  Any user that has the Add and Customize Pages permission • Some use cases could have been forgotten • Some users can have bad intent
  • 15. aOS Luxembourg 4 décembre 2017 DEMO 2 Malicious Script
  • 16. aOS Luxembourg 4 décembre 2017 SharePoint & JavaScript embedding • JavaScript embedding is ALWAYS DISABLED on Modern UI • JavaScript embedding can be turned off on Classic UI  Will impact several built-in components such as • Search WebParts • Content Rollup • Document Sets • … • SPFx packages are deployed via app catalog by administrators • Administrators are always aware of what can be executed on their tenant
  • 17. aOS Luxembourg 4 décembre 2017 DEMO 3 Deploy SPFx solutions
  • 18. aOS Luxembourg 4 décembre 2017 JavaScript & Permissions • We might need our application to do more than what the user is allowed to  we must delegate the job to a trusted third-party • The third-party is authorized through App-Only permissions • In the context of SharePoint Online, an Azure Function is a good option • SharePoint Online always has an underlying Azure AD, the logged-in user can easily authenticate against the Azure Function • Azure Functions limit the maintenance and running costs • Azure Functions can be written in several languages • Azure Functions can be replaced by any third party if better suited
  • 19. aOS Luxembourg 4 décembre 2017 DEMO 4 Delegate to Azure Functions
  • 20. aOS Luxembourg 4 décembre 2017 Summary • JavaScript is probably the best choice for responsive and user friendly UI in browser • SPFx IS the way to go for modern development in SharePoint • Add-ins (Provider Hosted) will remain in shapes of APIs or full external applications interacting with SharePoint • Azure Functions are a good fit to implement Server-side code on Serverless architecture (handled authentication with Azure AD) • Custom APIs communicating with SharePoint can be hosted on any platform in any technology (through REST API)
  • 21. aOS Luxembourg 4 décembre 2017 Questions ?
  • 22. aOS Luxembourg 4 décembre 2017 Thank you !
  • 23. aOS Luxembourg 4 décembre 2017 References • https://support.office.com/en-us/article/Allow-or-prevent- custom-script-1f2c515f-5d7e-448a-9fd7-835da935584f?ui=en- US&rs=en-US&ad=US • https://support.office.com/en-us/article/Security- considerations-of-allowing-custom-script-b0420ab0-aff2-4bbc- bf5e-03de9719627c • https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web- parts/guidance/connect-to-api-secured-with-aad • https://aka.ms/sppnp
  • 24. aOS Luxembourg 4 décembre 2017 Merci à notre sponsor !