#SPSNYC 2018 Migrate your custom components to the #SharePoint Framework #SPFX
Jul. 28, 2018•0 likes•305 views
Download to read offline
Report
Technology
Slides supporting the session at 2018 SharePoint Saturday New York CIty. Talking about the SPFX azure functions the microsoft graph, provisioning, site scripts and so much more!
2. Vincent Biret
Passionate about development, community and technologies
@baywet
bit.ly/vince365
MVP Office Servers and Services
Azure and Office 365 developer @ 2toLead
3. EVALS / PRIZES
Bring all items to the 6th Info Desk
• Bingo Cards = how you win prizes at the
end of the event.
• The cards must be stamped by ALL the
Sponsors by the last session (4pm)
• Fill out speakers evaluations (located in
the front of the rooms
• Fill out the event evaluations And more …
Surface Go
Xbox One X
4. THANK YOU
EVENT SPONSORS
We appreciated you supporting the
New York SharePoint Community!
• Diamond, Platinum, Gold, & Silver have
tables scattered throughout
• Please visit them and inquire about their
products & services
• To be eligible for prizes make sure to get
your bingo card stamped by ALL sponsors
• Raffle at the end of the day and you must
be present to win!
5. Beer Authority
300 W 40h St
[across the street]
Join us for a round of drinks
http://www.beerauthoritynyc.com
6. 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
7. Agenda
• Introduction
• Demo – the pirates treasures
management solution
• History
• The new stack
• Branding
• Provisioning
• Accessing data
• Line of business applications
• Batch jobs
• Conclusion
11. 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
12. The sandbox model was an attempt at fixing some of the problems but it was bringing
other issues on board
SharePoint Sandbox
• 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
13. 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, iframe!!
• No downtime during deployments
• Still no unit tests
• Incomplete REST API
• Still no more batch jobs
14. 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 »
15. 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
16. 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
• …
18. Have you already seen these slides?
Question!
•Who has never heard about the
SharePoint Framework before this
talk?
19. The Short Version
• New Tools!
• Front End only!
• Local And Remote WorkBench
• Closed source relying on open source
• First and third party
20. 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
• Custom Api /MS Graph access
• Version 1.1 of SPFX
• No application extensions
21. On Prem 2019 RTM
• Should contain version 1.4.0 or upwards
• (Microsoft hasn’t confirmed yet)
• Support for modern pages
• Support for SPFX Webparts
• (without AAD/Graph Client, connected props….)
• Support for Application customizer
• Support for Command Set customizer
• Support for Field customizer
24. 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
26. You currently four options, limited feature, code, pnp template or site script in preview.
Microsoft is working on filling the gaps around those scenarios.
Proivisioning options
• Most SPFX samples include code provisioning
• SPFX provides limited « feature framework » support for provisioning
• Pattern and Practices has made awesome work
• PnP Provisioning far better than code
• Site script to be executed based on templates
• Limited functionalities, can call a flow
• which can call a function and apply a pnp template
29. 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! (@pnp/sp, @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)
30. Microsoft has a desire to enable SPFX devs to build complex LOB applications backed by
MS or custom API’s
Custom API & Graph Access from SPFX – preview
• SPFx components access custom Web APIs or MS Graph
• Additional permission scopes can be requested
• Bakes in the auth for you and provides a ready to use client
• Web APIs and Permission Scopes managed by Microsoft still available
• Admins 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",
}
31. 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
34. 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
35. 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
42. 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
Components
TimerJob Event Receivers
New tool Flow/
Logic Apps
SPFX Azure Function RER’s
WebHooks
Purpose Augmentations Provisioning Branding Data Forms …
Old tool JSLink/ScriptLink/Cu
stom Actions
Feature Framework Design manager SSOM/
JSOM
InfoPath …
New tool SPFX Extensions:
Application,
Command Set, Field
customizers,
Column Formatting
PnP Provisioning / Site
Scripts
Custom Themes CSOM/
PNP-Core/
REST/
Graph/
Custom API
PowerApps/
Forms
…
We’re still
missing
custom page
layouts
43. 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
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
Show the solution in code, gulp serve https://baywet.sharepoint.com/sites/sessionmigratespfx/_layouts/15/workbench.aspx
gulp –tasks
https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/column-formatting
PowerShell management support (6906.1200): https://aka.ms/spsitetheming
Theme builder tool (hosted on Fabric site): https://aka.ms/spthemebuilder