SlideShare a Scribd company logo
1 of 21
Developing For
Multiple
Environments
on SharePoint
Online
April 10, 2018
Please Thank our Sponsors
About Me
Principal Consultant & Team Lead
fsikorski@cardinalsolutions.com
https://www.linkedin.com/in/fsikorski85
FRANK
SIKORSKI
Business Productivity
• Started SharePoint consulting in 2011
• SharePoint 2010, 2013, 2016
• SharePoint Online
• Types of work
• Development
• Governance
• Information Architecture
• Administration
• Work with clients in various industries
• Financial
• Law
• Fast Food
• Automotive
• Distilled Spirits
MY AGENDA TODAY
Code Promotion Practices
On-Premise vs SharePoint
Remote Provisioning
Development Practices
1
2
3
4
Code Promotion Practices
Development
• Programming
• Unit Testing
• Could be developer
specific
• Loosely Controlled
Test / QA
• Code Integration Testing
• User Testing
• Functionality Sign-off
• Deployment Dry Run
Production
• End User Environment
• Highly Controlled
On-Premise vs Online
Multiple
Domains
Separate Service
Applications
Single
Domain
Shared Service
Applications
On-Premise Online
Farm Architecture
On-Premise vs Online
On-Premise Online
Development
http://intranet-dev.company.com
Search
Managed
Metadata
User Profile
Test / QA
http://intranet-qa.company.com
Search
Managed
Metadata
User Profile
Production
http://intranet.company.com
Search
Managed
Metadata
User Profile
Development
https://company.sharepoint.com/sites/dev
Searc
h
Managed
Metadata
User
Profile
Test / QA
https://company.sharepoint.com/sites/qa
Production
https://company.sharepoint.com
On-Premise vs Online
Server-side and Client-side
Code
Farm Solutions,
Sandbox Solutions
Custom Master Page
On-Premise Online
Development
Client-side Code
Sandbox Solutions (declarative),
Remote Provisioning
Alternate CSS,
Custom Actions (ScriptLink)
Remote Provisioning
• Classic Experience
• Client Side-Object Model
• SharePoint Patterns and Practices (PnP) utilities
• Visual Studio .NET Website
• Alternatives: Console App, WinForms, PowerShell
Overview
Remote Provisioning
• Solution
• How Projects are built and deployed
• Project
• Property definitions
• Default Configurations
• Debug
• Release
Visual Studio Configuration Manager
Remote Provisioning
• “Environment” appSetting
<appSettings>
<add key="Environment" value="Prod" />
</appSettings>
• Debug Configuration
<appSettings>
<add key="Environment" value="QA" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
</appSettings>
• Release Configuration
<appSettings>
<add key="Environment" value="Prod" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
</appSettings>
Web.config Transformations
Remote Provisioning
• JavaScript object changed at deployment based on appSetting
• Environment Flag
• Term Store Names
• User Profile Property Names
File Manipulation
var CSGEnvironment = {
Environment: "{ENVIRONMENT}",
TermSetGlobalNav: "{TERM_SET_GLOBAL_NAV}",
UserProfileFavorites: "{USER_PROFILE_FAV}"
};
Remote Provisioning
private static System.IO.Stream ReplaceFileTokens(string filePath)
{
string fileText = System.IO.File.ReadAllText(filePath);
if (WebConfigurationManager.AppSettings["Environment"] == "PROD")
{
fileText = fileText.Replace("{ENVIRONMENT}", "PROD" );
fileText = fileText.Replace("{TERM_SET_GLOBAL_NAV}", "CSGGlobalNav_Prod");
fileText = fileText.Replace("{USER_PROFILE_FAV}", "CSGFavoritesProd");
}
else
{
fileText = fileText.Replace("{ENVIRONMENT}", "QA" );
fileText = fileText.Replace("{TERM_SET_GLOBAL_NAV}", "CSGGlobalNav_QA");
fileText = fileText.Replace("{USER_PROFILE_FAV}", "CSGFavoritesQA");
}
byte[] bytes = System.Text.Encoding.ASCII.GetBytes(fileText);
System.IO.Stream ms = new System.IO.MemoryStream(bytes);
return ms;
}
File Manipulation
Remote Provisioning
File Manipulation
var CSGEnvironment = {
Environment: "{ENVIRONMENT}",
TermSetGlobalNav: "{TERM_SET_GLOBAL_NAV}",
UserProfileFavorites: "{USER_PROFILE_FAV}"
};
var CSGEnvironment = {
Environment: "PROD",
TermSetGlobalNav: "CSGGlobalNav_Prod",
UserProfileFavorites: "CSGFavoritesProd"
};
Solution File Deployed File
Demo
Remote Provisioning
Development Practices
• Dynamically adjust URL for REST calls
• Each environment different relative path
• Leverage _spPageContextInfo global JS variable
• siteServerRelativeUrl
• webServerRelativeUrl
Querying Lists
var restURL = _spPageContextInfo.siteServerRelativeUrl + "/_api/web/lists/getByTitle('ListTitle')/items?$select=ID,Title"
Development Practices
• Custom Webpart REST API Calls
• Same dynamic url as list querying
• KQL Query Tokens
• Scopes
• Site, Page, User, Terms, Lists
• {Site.URL}
• Path:{Site.URL}/Pages
SharePoint Search
Development Practices
• Use globally defined constants
• CSGEnvironment.Environment
• CSGEnvironment.TermSetGlobalNav
• CSGEnvironment.UserProfileFavorites
Using Environment Object
Demo
Development Practices
References
• Blog Post
• https://www.cardinalsolutions.com/blog/2017/05/developing_for_mulitpl
e_environments_in_sharepoint_online
• KQL Information
• KQL query language syntax reference
• Query Variable in SharePoint
• SharePoint Patterns and Practices
• https://dev.office.com/patterns-and-practices
THANK YOU
Contact Info
Frank Sikorski
Principal Consultant
513.984.6700
fsikorski@cardinalsolutions.com

More Related Content

What's hot

What's hot (20)

Neonatal Pain
Neonatal PainNeonatal Pain
Neonatal Pain
 
Neonatal Resuscitation Dr. Ammar Ahmed.pptx
Neonatal Resuscitation Dr. Ammar Ahmed.pptxNeonatal Resuscitation Dr. Ammar Ahmed.pptx
Neonatal Resuscitation Dr. Ammar Ahmed.pptx
 
Makalah hpp
Makalah hppMakalah hpp
Makalah hpp
 
Ncp
NcpNcp
Ncp
 
27447250 health-teaching-plan-for-dengue-hemorrhagic-fever
27447250 health-teaching-plan-for-dengue-hemorrhagic-fever27447250 health-teaching-plan-for-dengue-hemorrhagic-fever
27447250 health-teaching-plan-for-dengue-hemorrhagic-fever
 
Anticipatory grieving related to pregnancy loss ncp
Anticipatory grieving related to pregnancy loss ncpAnticipatory grieving related to pregnancy loss ncp
Anticipatory grieving related to pregnancy loss ncp
 
Ibis ppt radiant warmer
Ibis ppt radiant warmerIbis ppt radiant warmer
Ibis ppt radiant warmer
 
Case study- Dengue Fver
Case study- Dengue FverCase study- Dengue Fver
Case study- Dengue Fver
 
MMDST-tool.pdf
MMDST-tool.pdfMMDST-tool.pdf
MMDST-tool.pdf
 
DDST (tumbuh kembang anak)
DDST (tumbuh kembang anak)DDST (tumbuh kembang anak)
DDST (tumbuh kembang anak)
 
Oxygen therapy
Oxygen therapyOxygen therapy
Oxygen therapy
 
HISTEROTOMI, SALPINGEKTOMI, HISTERORAPI, SEKSIO SESAREA
HISTEROTOMI, SALPINGEKTOMI, HISTERORAPI, SEKSIO SESAREAHISTEROTOMI, SALPINGEKTOMI, HISTERORAPI, SEKSIO SESAREA
HISTEROTOMI, SALPINGEKTOMI, HISTERORAPI, SEKSIO SESAREA
 
Penyakit sistemik kehamilan3
Penyakit sistemik  kehamilan3Penyakit sistemik  kehamilan3
Penyakit sistemik kehamilan3
 
TANDA TANDA VITAL
TANDA TANDA VITALTANDA TANDA VITAL
TANDA TANDA VITAL
 
Nutrisi pada BBLR
Nutrisi pada BBLRNutrisi pada BBLR
Nutrisi pada BBLR
 
Choanal atresia
Choanal atresiaChoanal atresia
Choanal atresia
 
91638981 case-study-scarlet-fever-repaired
91638981 case-study-scarlet-fever-repaired91638981 case-study-scarlet-fever-repaired
91638981 case-study-scarlet-fever-repaired
 
POLDCARTS .pdf
POLDCARTS .pdfPOLDCARTS .pdf
POLDCARTS .pdf
 
Kardex form for patient assignments
Kardex form for patient assignmentsKardex form for patient assignments
Kardex form for patient assignments
 
Tanda bahaya kehamilan
Tanda bahaya kehamilanTanda bahaya kehamilan
Tanda bahaya kehamilan
 

Similar to Developing For Multiple Environments on SharePoint Online

(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery GuideMark Rackley
 
SharePoint 2010 Global Deployment
SharePoint 2010 Global DeploymentSharePoint 2010 Global Deployment
SharePoint 2010 Global DeploymentJoel Oleson
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery GuideMark Rackley
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConSPTechCon
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 Mark Rackley
 
Share point online 미리보기
Share point online 미리보기Share point online 미리보기
Share point online 미리보기Jeong-woo Choi
 
MicroSoft Sharepoint Online Training in Canada
MicroSoft Sharepoint Online Training in Canada MicroSoft Sharepoint Online Training in Canada
MicroSoft Sharepoint Online Training in Canada BoundTechS
 
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...Joel Oleson
 
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EEJavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EERodrigo Cândido da Silva
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14Mark Rackley
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013Kiril Iliev
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Vishal Pawar
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User Group
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User GroupSharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User Group
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User GroupDrew Madelung
 
SharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesSharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesRicardo Wilkins
 
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas VochtenaOS Community
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기lanslote
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint FrameworkMałgorzata Borzęcka
 
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du SolierLuis Du Solier
 
sps-2013-architecture-overview.pdf
sps-2013-architecture-overview.pdfsps-2013-architecture-overview.pdf
sps-2013-architecture-overview.pdfandinieldananty
 

Similar to Developing For Multiple Environments on SharePoint Online (20)

(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide(Updated) SharePoint & jQuery Guide
(Updated) SharePoint & jQuery Guide
 
SharePoint 2010 Global Deployment
SharePoint 2010 Global DeploymentSharePoint 2010 Global Deployment
SharePoint 2010 Global Deployment
 
The SharePoint & jQuery Guide
The SharePoint & jQuery GuideThe SharePoint & jQuery Guide
The SharePoint & jQuery Guide
 
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechConThe SharePoint and jQuery Guide by Mark Rackley - SPTechCon
The SharePoint and jQuery Guide by Mark Rackley - SPTechCon
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
 
Share point online 미리보기
Share point online 미리보기Share point online 미리보기
Share point online 미리보기
 
MicroSoft Sharepoint Online Training in Canada
MicroSoft Sharepoint Online Training in Canada MicroSoft Sharepoint Online Training in Canada
MicroSoft Sharepoint Online Training in Canada
 
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
Teched Middle East New World of SharePoint 2010 Administration with Joel Oles...
 
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EEJavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
JavaOne 2014 - Supporting Multi-tenancy Applications with Java EE
 
The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14The SharePoint & jQuery Guide - Updated 1/14/14
The SharePoint & jQuery Guide - Updated 1/14/14
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013Introduction To Microsoft SharePoint 2013
Introduction To Microsoft SharePoint 2013
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User Group
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User GroupSharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User Group
SharePoint Server 2016 - Lets get ready - Wisconsin SharePoint User Group
 
SharePoint 2013 Dev Features
SharePoint 2013 Dev FeaturesSharePoint 2013 Dev Features
SharePoint 2013 Dev Features
 
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
2018 09-03 aOS Aachen - SharePoint demystified - Thomas Vochten
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
 
Introduction to SharePoint Framework
Introduction to SharePoint FrameworkIntroduction to SharePoint Framework
Introduction to SharePoint Framework
 
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier
8 - Productividad en la Nube con BPOS - SharePoint Online, por Luis Du Solier
 
sps-2013-architecture-overview.pdf
sps-2013-architecture-overview.pdfsps-2013-architecture-overview.pdf
sps-2013-architecture-overview.pdf
 

Recently uploaded

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Developing For Multiple Environments on SharePoint Online

  • 2. Please Thank our Sponsors
  • 3. About Me Principal Consultant & Team Lead fsikorski@cardinalsolutions.com https://www.linkedin.com/in/fsikorski85 FRANK SIKORSKI Business Productivity • Started SharePoint consulting in 2011 • SharePoint 2010, 2013, 2016 • SharePoint Online • Types of work • Development • Governance • Information Architecture • Administration • Work with clients in various industries • Financial • Law • Fast Food • Automotive • Distilled Spirits
  • 4. MY AGENDA TODAY Code Promotion Practices On-Premise vs SharePoint Remote Provisioning Development Practices 1 2 3 4
  • 5. Code Promotion Practices Development • Programming • Unit Testing • Could be developer specific • Loosely Controlled Test / QA • Code Integration Testing • User Testing • Functionality Sign-off • Deployment Dry Run Production • End User Environment • Highly Controlled
  • 6. On-Premise vs Online Multiple Domains Separate Service Applications Single Domain Shared Service Applications On-Premise Online Farm Architecture
  • 7. On-Premise vs Online On-Premise Online Development http://intranet-dev.company.com Search Managed Metadata User Profile Test / QA http://intranet-qa.company.com Search Managed Metadata User Profile Production http://intranet.company.com Search Managed Metadata User Profile Development https://company.sharepoint.com/sites/dev Searc h Managed Metadata User Profile Test / QA https://company.sharepoint.com/sites/qa Production https://company.sharepoint.com
  • 8. On-Premise vs Online Server-side and Client-side Code Farm Solutions, Sandbox Solutions Custom Master Page On-Premise Online Development Client-side Code Sandbox Solutions (declarative), Remote Provisioning Alternate CSS, Custom Actions (ScriptLink)
  • 9. Remote Provisioning • Classic Experience • Client Side-Object Model • SharePoint Patterns and Practices (PnP) utilities • Visual Studio .NET Website • Alternatives: Console App, WinForms, PowerShell Overview
  • 10. Remote Provisioning • Solution • How Projects are built and deployed • Project • Property definitions • Default Configurations • Debug • Release Visual Studio Configuration Manager
  • 11. Remote Provisioning • “Environment” appSetting <appSettings> <add key="Environment" value="Prod" /> </appSettings> • Debug Configuration <appSettings> <add key="Environment" value="QA" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/> </appSettings> • Release Configuration <appSettings> <add key="Environment" value="Prod" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/> </appSettings> Web.config Transformations
  • 12. Remote Provisioning • JavaScript object changed at deployment based on appSetting • Environment Flag • Term Store Names • User Profile Property Names File Manipulation var CSGEnvironment = { Environment: "{ENVIRONMENT}", TermSetGlobalNav: "{TERM_SET_GLOBAL_NAV}", UserProfileFavorites: "{USER_PROFILE_FAV}" };
  • 13. Remote Provisioning private static System.IO.Stream ReplaceFileTokens(string filePath) { string fileText = System.IO.File.ReadAllText(filePath); if (WebConfigurationManager.AppSettings["Environment"] == "PROD") { fileText = fileText.Replace("{ENVIRONMENT}", "PROD" ); fileText = fileText.Replace("{TERM_SET_GLOBAL_NAV}", "CSGGlobalNav_Prod"); fileText = fileText.Replace("{USER_PROFILE_FAV}", "CSGFavoritesProd"); } else { fileText = fileText.Replace("{ENVIRONMENT}", "QA" ); fileText = fileText.Replace("{TERM_SET_GLOBAL_NAV}", "CSGGlobalNav_QA"); fileText = fileText.Replace("{USER_PROFILE_FAV}", "CSGFavoritesQA"); } byte[] bytes = System.Text.Encoding.ASCII.GetBytes(fileText); System.IO.Stream ms = new System.IO.MemoryStream(bytes); return ms; } File Manipulation
  • 14. Remote Provisioning File Manipulation var CSGEnvironment = { Environment: "{ENVIRONMENT}", TermSetGlobalNav: "{TERM_SET_GLOBAL_NAV}", UserProfileFavorites: "{USER_PROFILE_FAV}" }; var CSGEnvironment = { Environment: "PROD", TermSetGlobalNav: "CSGGlobalNav_Prod", UserProfileFavorites: "CSGFavoritesProd" }; Solution File Deployed File
  • 16. Development Practices • Dynamically adjust URL for REST calls • Each environment different relative path • Leverage _spPageContextInfo global JS variable • siteServerRelativeUrl • webServerRelativeUrl Querying Lists var restURL = _spPageContextInfo.siteServerRelativeUrl + "/_api/web/lists/getByTitle('ListTitle')/items?$select=ID,Title"
  • 17. Development Practices • Custom Webpart REST API Calls • Same dynamic url as list querying • KQL Query Tokens • Scopes • Site, Page, User, Terms, Lists • {Site.URL} • Path:{Site.URL}/Pages SharePoint Search
  • 18. Development Practices • Use globally defined constants • CSGEnvironment.Environment • CSGEnvironment.TermSetGlobalNav • CSGEnvironment.UserProfileFavorites Using Environment Object
  • 20. References • Blog Post • https://www.cardinalsolutions.com/blog/2017/05/developing_for_mulitpl e_environments_in_sharepoint_online • KQL Information • KQL query language syntax reference • Query Variable in SharePoint • SharePoint Patterns and Practices • https://dev.office.com/patterns-and-practices
  • 21. THANK YOU Contact Info Frank Sikorski Principal Consultant 513.984.6700 fsikorski@cardinalsolutions.com

Editor's Notes

  1. How built and deployed – if configured for mobile will only show mobile supported items
  2. How built and deployed – if configured for mobile will only show mobile supported items
  3. How built and deployed – if configured for mobile will only show mobile supported items
  4. How built and deployed – if configured for mobile will only show mobile supported items
  5. How built and deployed – if configured for mobile will only show mobile supported items