This document summarizes a presentation about upgrading custom code from the full trust and sandboxed solutions models to the SharePoint Add-in and Framework models. It discusses the history of SharePoint development and the different available options. It then covers common migration patterns for various custom code pieces like web parts, custom pages, and event receivers. It provides demos of migrating to client-side web parts and using remote provisioning and webhooks. The presentation suggests leveraging the SharePoint Framework, Microsoft Graph API, and Office 365 applications for modern development.
Finology Group â Insurtech Innovation Award 2024
Â
Upgrading from Full Trust Code to Add-In Model and SharePoint Framework
1. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels Track: DEV | Level: 300
Upgrading from Full Trust
Code to Add-in Model and
SharePoint Framework
Paolo Pialorsi - @PaoloPia
Senior Consultant - PiaSys.com
3. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
About me
⢠Project Manager, Consultant, Trainer
⢠About 50 Microsoft certification exams passed
⢠MCSM â Charter SharePoint
⢠MVP Office Servers and Services
⢠SharePoint & Office 365 Dev PnP Core Team Member
⢠Focused on SharePoint and Office 365 since the
beginning
⢠Author of many books about XML, SOAP, .NET,
LINQ, SharePoint, and Office 365
⢠Speaker at main IT conferences
4. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Agenda
⢠Where do we come from?
⢠Migrating and upgrading customizations
⢠Common migration patterns
⢠Q&A (if time permitsâŚ)
6. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
A Brief History of SharePoint Development
Farm solutions
ď§ Full trust solutions
ď§ File system access
ď§ GAC deploy
ď§ 14 hive access
ď§ .NET managed code
ď§ Inherited from SP2007
Sandbox solutions
ď§ Partially trusted code
ď§ Limited API
ď§ .NET managed code
ď§ No access to file system
ď§ No calls to services
Add-In Model
ď§ New model app-oriented
ď§ Deployed from corporate
catalog or Office
Marketplace
ď§ Based on web standards
ď§ No code with server
object mode!
Solutions Model Add-In model
SP2010
SP2013/SP2016
SharePoint Framework
ď§ New model for client-side
development
ď§ Client-side Web Parts
ď§ Extensions
ď§ Based on web stack
ď§ TypeScript/JS
ď§ REST API
Client-side model
SPO (and partially SP2016 FP2)
7. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Web Parts Extensions
Client side
Tools
SP APIs
Package
Deployment
Experiences
Development
SharePoint Online Modern Development Stack
CSOM
Add-ins
MS Graph
8. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Itâs not all about SharePoint
⢠In Office 365 and in hybrid topologies there is a cooler option
⢠Office 365 Applications/Azure AD Applications
⢠Register the application in Azure AD
⢠Access the full Office 365 ecosystem of services
⢠Using the Microsoft Graph API
⢠Or the old REST API on a per-service basis
⢠You can still have full access to SPO via REST/CSOM
⢠And few new capabilities using the Microsoft Graph
9. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Nowdays available development options
⢠SharePoint 2013/2016 on-premises
⢠SharePoint Add-In model
⢠SharePoint Framework client-side Web Parts (SP2016 FP2 only)
⢠SharePoint Online
⢠SharePoint Add-In model
⢠SharePoint Framework
⢠Office 365 Application (aka Azure AD Application)
⢠Keep in mind hybrid topologies âŚ
11. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Steps to Upgrade/Migrate
⢠Assess existing solutions
⢠Information Architecture
⢠Provisoned sites and content
⢠Data repositories
⢠Analyze any new requirement
⢠Leverage the upgrade/migration to improve your solutions
⢠Upgrade/migrate on a step-by-step basis
⢠Choose the right development tool/architecture
⢠Migrate the Information Architecture
⢠Migrate the project based on the requirements
12. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Are There Migration Paths?
⢠Well ⌠no, ehm yes, or maybe ď âŚ
⢠You shouldnât compare FTC/Sandbox with Add-In/SPFx as 1:1
⢠They have different goals and satisfy somehow different needs
⢠But you should be able to do what is really needed to do
⢠Or what Microsoft assumes that should be done ď
⢠Letâs see some common examples and migration patterns âŚ
13. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Web Parts
⢠Are you in Modern Sites/Pages?
⢠SPFx Client Side Web Parts
⢠Are you in Classic Sites/Pages or on-premises?
⢠SPFx Client Side Web Parts (still)
⢠Custom JavaScript code (client-side rendering)
⢠Script Editor Web Part (JS injection)
⢠User Custom Actions (JS embedding)
⢠Try to avoid App Parts of the Add-In Model
⢠Live and let die ď âŚ
15. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Custom Pages
⢠Are you in Modern Sites/Pages?
⢠Modern Pages + SPFx Client-side Web Parts
⢠Full Page Apps with Add-In Model
⢠Office 365 Applications (eventually hybrid for on-premises)
⢠Are you in Classic Sites/Pages or on-premises?
⢠Classic Pages + SPFx Client-side Web Parts
⢠Full Page Apps with Add-In Model
⢠Office 365 Applications (eventually hybrid for on-premises)
⢠User Custom Actions (JS embedding) with âblankâ pages
16. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Custom Actions
⢠Are you in Modern Sites?
⢠SharePoint Framework Extensions
⢠Application Customizers
⢠Command Sets
⢠Are you in modern lists/libraries in Classic Sites?
⢠Few UI Custom Actions (ECB and Ribbon) menu items?
⢠But without any JavaScript embedding or ScriptLink/ScriptBlock
⢠Are you in Classic Sites or on-premises?
⢠Custom Actions via SharePoint Add-In Model
⢠Custom Actions via Office 365 Application (eventually hybrid for on-premises)
18. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
JSLink and List Views Customizations
⢠Are you in Modern Sites?
⢠SharePoint Framework Extensions
⢠Field Customizers
⢠Are you in Classic Sites or on-premises?
⢠Use CSOM and apply the JSLink remotely
⢠Use Remote Provisioning (PnP? What else? ď)
⢠Inject via Office 365 Application (eventually hybrid for on-premises)
19. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Event Receivers
⢠Use SharePoint Webhooks (in SPO only)
⢠To be open to any development platform
⢠To have a guaranteed delivery model
⢠To trap events related to lists and libraries (only, so far âŚ)
⢠To be fully asynchronous
⢠Use Remote Event Receivers, instead
⢠If youâre on-premises
⢠Or if you like to use .NET and WCF
⢠Thereâs no guaranteed delivery of events
⢠If you need kind of events other than lists and libraries (in SPO, too)
⢠Sites/Web, Permissions, Security (Role/Group), Fields, BCS Entities
21. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Provisioning of Artifacts
⢠Are you in Modern Sites?
⢠Use Remote Provisioning
⢠Be aware of some limitations due to the ânoscriptâ flag
⢠Use SPFx provisioning when itâs related to client-side web parts
⢠I donât like it (just to be clear âŚ) but still âŚ
⢠Are you in Classic Sites or on-premises?
⢠Use Remote Provisioning
23. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Timer Jobs
⢠The Remote Timer Jobs are a very good replacement
⢠Can be Azure WebJobs or Azure Functions
⢠More in general can be any application using REST/CSOM remotely
⢠You can leverage the Remote Timer Job Framework
⢠Available in the PnP Core Library
24. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Workflows
⢠Get rid of SP2010 workflows based on WF 3.x
⢠Use Flow/PowerApps
⢠If they satisfy your functional requirements
⢠They are available both on Classic and Modern sites âŚ
⢠Or create Workflow Manager workflows
⢠Provision any custom action via markup-only sandboxed solutions
⢠Or even better using Remote Provisioning (more support has yet to come âŚ)
⢠Provision workflows using
⢠SharePoint Add-Ins
⢠Remote Provisioning (a PnP âsolutionâ will come âŚ)
25. SharePoint Saturday Belgium 2017 ⢠October 21 ⢠Brussels
Wrap up
⢠SPFx and the SharePoint Add-In Model are not competing
⢠Actually, right now they are somehow complementary
⢠You should consider Office 365 Applications, too
⢠Mind the noscript flag of Modern Sites
⢠Classic sites can benefit of SPFx in classic pages, too
⢠And you have the modern UI for lists and libraries
⢠Leverage the Microsoft Graph API
⢠To benefit of the full Office 365 ecosystem