slides of the session migration your custom components to the SharePoint Framework at SPS Ottawa 2017. Also talking about azure functions, Microsoft Graph, flow, powerapps
3. Salon A @ 4:45 pm
Please drink responsibly . We will be happy to call a cab for you
Fill out your speaker evaluations to ensure
your chance at winning some great prizes!!
https://tinyurl.com/yae7onxy
4. Vincent Biret
Passionate about development, community and technologies
@baywet
bit.ly/vince365
MVP Office Servers and Services
Azure and Office 365 developer @ 2toLead
5. SharePoint Framework being GA and reaching on prem means it’s time for key decisions
making
Targeted audience
Seasoned
SharePoint
developer
Project manager New to SharePoint Dev Decision Maker
6. Agenda
• Introduction
• Demo – the pirates treasures
management solution
• History
• The new stack
• Provisioning
• Missing bits
• Accessing data
• Line of business applications
• Batch jobs
• Conclusion
7. Ask questions, I’ll ask questions, share your feedback, stay awake, learn and have fun!
Ready?
10. SharePoint Full trust model has been around for a while but for obvious reasons we need
to transition from that
SharePoint Full Trust
• Code executing server side
• User or service Context
• Bad code would break/slow
down SharePoint
• Deploying meant downtime
• Very little unit tests
11. The sandbox model was an attempt at fixing some of the problems but it was bringing
other issues on board
SharePoint Sanbox
• Still running on SharePoint server
• User Context only
• Bad code would not impact SharePoint too much
• No downtime during deployments
• Still no unit tests
• Limited access to OM
• Bad throttling could happen
• No more batch jobs
12. Add-ins were a good attempt to change directions but it was not taking into account the
general motion of the web
SharePoint add-ins (SharePoint Hosted)
• Running client-side
• User Context only
• Bad code doesn’t impact SharePoint
• But wait, wireframe!!
• No downtime during deployments
• Still no unit tests
• Incomplete REST API
• Still no more batch jobs
13. Provider hosted add-ins proved to be efficient but still required a great knowledge of
SharePoint and had some complexity during deployments
SharePoint Add-ins (Provider Hosted)
• Running Server Side (not SharePoint)
• User and App Context
• Bad code doesn’t impact SharePoint
• No downtime during deployment
• Unit tests got easier
• CSOM and REST API
• Batchjobs « capable »
14. And the general feeling of an average SharePoint developer was either bitterness or
frustration, especially when we compared with other developers and the tools they had.
SharePoint Add-ins/Sandbox
15. Some developers felt the winds turning and started gearing for that as well as changing
their approach.
Workarounds
• Content Script Editor Webpart
• Display templates
• JSLink
• ScriptLink
• PowerShell
• …
22. The product team is working to get a good on premises story so you can develop
solutions working on both environments with little to no changes
On prem 2016 feature pack 2
• Brings SPFX webparts support
• Few limitations
• Api /graph access
• Version 1.1 of SPFX
• No application extensions
23. The SPFX team is trying to fill the gaps with add-ins model
Extensibility
26. It’s been a long time challenge even back with SharePoint 2007 and connectable
webparts. Microsoft announced something around that during the build but we haven’t
heard about it so far.
Webpart communication
28. Microsoft is finally providing us a way to customize branding with the modern
experience, however don’t expect to have a much control as we used to.
Modern experience custom themes
• Central gallery to host custom
themes for entire organization
• PowerShell commands to manage
and hide out-of-box themes
30. You currently four options, limited feature, code, pnp template or site script in preview.
Microsoft is working on filling the gaps around those scenarios.
Partial feature framework with SPFX
• Most SPFX samples include code provisioning
• SPFX provides limited feature provisioning
• Pattern and Practices has made awesome work
• PnP Provisioning far better than code
• PREVIEW: Site script to be executed based on templates
• Limited functionalities, can call a flow
• which can call a function and apply a pnp template
33. Integration with house made or third party systems was one of the key requirements in
building SPFX
Multiple API’s
• SharePoint REST API’s
• TypeScript libraries available, use those! (sp-pnp-js, @types/SharePoint)
• Microsoft Graph
• Get access to much more data
• (no demo on that today, too much content)
• (Microsoft working on improving auth story)
• Or your own API (next slide)
34. Microsoft has a desire to enable SPFX devs to build complex LOB applications backed by
MS or custom API’s
Custom API Access from SPFX – coming soon
• Today: SPFX web part have a limited access to the graph
• Tomorrow:
• SPFx components access specific Web APIs
• Additional permission scopes from Global available End Points
• Uses AAD implicit flow and ADAL.JS library
• Web APIs and Permission Scopes managed by Microsoft still available
• Tenants can control additional access through per tenant AAD Service Principal
• Managed by SharePoint Online infrastructure
{
"WebApiPermissionRequest": {
"ResourceId": “GUID goes here",
"Scope": “GUID goes here",
}
"WebApiPermissionRequest": {
"ResourceId": “GUID goes here",
"Scope": “GUID goes here",
}
"WebApiPermissionRequest": {
"ResourceId": “GUID goes here",
"Scope": “GUID goes here",
}
35. Event receivers were some kind of predecessors of the modern webhooks, SharePoint
developers won’t be un-familiar with those.
Reacting on data events
• We used to have Event Receivers
• SP Provider Hosted Add-ins have RER’s (same thing
over HTTP)
• SharePoint API /MS Graph provides webhooks
support
• PREVIEW: Better integration between Azure Functions
and Microsoft Graph
38. Azure Functions is also a valid approach for smaller processes, Flow is the most user
friendly, Logic Apps the most complete and Functions are simple for developers
Workflows
Azure Logic Apps
39. Prefer PowerApps for more complex corporate apps and Forms for simple forms or you
want to expose it to external users
Entry forms/simple apps
46. Things are going really fast demonstrating Microsoft’s desire to close the gaps with on
premices solutions and provide modern solutions at every level
Modern tools reference
Purpose Workflows LOB Batch Events
Old tool SP Designer Front
end
scripting
TimerJob Event Receivers
New
tool
Flow/
Logic Apps
SPFX Azure
Function
RER’s
WebHooks
Purpose Augmentations Provisioning Branding Data Forms …
Old tool JSLink/ScriptLink Feature Framework Design manager SSOM/
JSOM
InfoPath …
New tool SPFX Extensions PnP Provisioning / Site
Scripts
Custom Themes CSOM/
PNP-Core/
REST/
Graph/
Custom API
PowerApps/
Forms
…
What Came out
since May 2017
47. Conclusion
• We have a modern tooling
• The SharePoint Framework is one item of our pirate gear
• Add-ins are still relevant in some scenarios
• Leverage other tools to have a full spectrum
• SharePoint dev cost will decrease because bigger community
• SharePoint devs’ life just became better
• Happy coding
At the end of the day, please ensure your evaluation is signed and handed in for door prizes. The draw takes place in The Observatory
Gestion des questions, interaction, ok avec ce programme?
1 powerapps desktop, treasures, fill in treasure
2 show the list item in sharepoint https://baywet.sharepoint.com/sites/sessionmigratespfx/Lists/Treasures
3 show the tweet on my profile
4 show the webpart on workbench https://baywet.sharepoint.com/sites/sessionmigratespfx/_layouts/15/workbench.aspx
5