SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Do’s and Dont’s for Office 365
Development
Chris O’Brien - MVP
Independent Consultant
Head of Development, Content and
Code
www.sharepointnutsandbolts.com
@ChrisO_Brien
http://cob-sp.com/COBLinkedIn
About me
Agenda
• The Office 365 dev landscape – things you
CAN’T do
• The DON’T list:
• 4 fundamental don’ts
• 4 “more debatable” don’ts 
• The DO list
• Remote provisioning
• Office 365 apps/auth over SharePoint Add-ins
• App script parts
• Summary
Office 365 dev – things you CAN’T do
Farm solutions (WSPs)
• No feature receivers
• No timer jobs
• No event receivers
Non-sandbox SharePoint API code
• No custom field controls
• No site definitions
• Etc..
The following are 100% NOT SUPPORTED in Office 365:
Fundamental “don’ts”
Don’t #1 - don't use the sandbox APIs
Why not:
• Microsoft are likely to disable server-
side code in SharePoint Online
What you CAN do:
• Use client-side code (e.g. JavaScript)
• Use remote server-side code (e.g. the
add-in model)
Don’t #2 - don't customize the suite bar
Why not:
• Microsoft need to “own” this – new functionality may appear
here
• JavaScript/CSS hacks may conflict with Microsoft changes
• Consistency across tenants
What you CAN do:
• Add a logo/
background image
• Change the color via Office 365 themes
Don’t #3 - don't rely on Office 365 HTML*
Why not:
• Microsoft need to change this
from time to time
• It is NOT an API or contract
What you CAN do:
• Provide your own HTML – master
page, layouts, display templates
etc.
(*or at least, be VERY careful!)
Don’t #4 - don't customize ODFB sites
Why not:
• Microsoft need to “own” this – new
functionality may appear here
• Now considered part of the service,
like Delve
• Becoming more like a doc lib, rather
than full site
Guidance webcast:
• http://cob-sp.com/1Oz2Vv2
Fundamental
“don’ts” summary:
1. Don’t use the sandbox APIs
2. Don’t customize the suite
bar
3. Don’t rely on Office 365
HTML
4. Don’t customize ODFB sites
Do’s:
1. Do use Office 365 themes/suite
bar options
2. Do use remote APIs:
1. CSOM (.NET)
2. JSOM
3. REST
4. Android/iOS
More controversial don’ts
1. Don’t use a custom master page
2. Don’t use a custom web
template
3. Don’t use Features to provision
fields and content types
..also:
1. Don’t use web parts
More debatable/controversial
don’ts:
#1 Don’t use a
custom master page
Don’t use a custom master page!
WHAT??
• This is the recommended approach to branding since
SharePoint 2007!
• Easy way to control all pages in a site (e.g. global
navigation, footer etc.)
Why not:
• Microsoft will update OOTB master pages with new
functionality
Office 365 updates and your master page
Time
OOTB
Master
Custom Master<< Copy >>
Service updates for introducing new version of
the out of the box master page with some new
capabilities or bug fixes.
Significant differences on the outcome unless custom
master page been updated during the releases.
New custom master page is created by
copying oob master or starting from scratch
using oob master as the reference
master
Seattle.master
Version 1.0 master
Seattle.master
Version 2.0 master
Seattle.master
Version 3.0
master
contoso.master
Version 1.0 master
contoso.master
Version 1.0 master
contoso.master
Version 1.0
Untested updates can be dangerous!
The scenario:
• Intranet with 50,000 users
• OOTB master page, with some custom
CSS/JavaScript
Untested O365 change = broken intranet
Strategies for dealing with this
1. Explicitly CHOOSE to use a custom master
page – SOME protection?
N.B. This involves “paying the
customization tax” – you need to copy
any Microsoft updates
2. Always have a First Release-enabled
tenant
Deciding whether to use a custom master
page
Other factors:
• Responsive design?
• Can CSS achieve the requirements?
More debatable/controversial
don’ts:
#2 Don’t use custom
WebTemplates
Don’t use custom WebTemplates!
Why not:
• It’s the same deal as custom master pages –
Microsoft will want to update e.g. the team
site definition
Maintenance challenge with web templates
Time
Team Site
Custom Web Template
<xml>
onet.xml
X feature activations
<xml>
onet.xml
X feature activations <xml>
onet.xml
X feature activations +2 <xml>
onet.xml
X feature activations +4
<xml>
onet.xml
X feature activations <xml>
onet.xml
X feature activations
<< Copy >>
More debatable/controversial
don’ts:
#3 Don’t use Features
to provision
fields/content types
etc.
Don’t use Features for provisioning
Why not:
• Provisioned artifacts have
dependency on Feature XML (in
content database)
• Microsoft don’t like this for
running Office 365
BUT:
• Is that the implementer’s
problem? 
Do’s:
#1 Do use remote
provisioning
Remote provisioning – the alternative to
WebTemplates
• Better APIs for remote provisioning now
• OfficeDev Patterns and Practices site provisioning framework:
• XML for defining custom site “template” definition
• Remote code (PowerShell or .NET) to create sites – Azure WebJob
• Full engine/framework for creating sites from a SharePoint list item
• Ability to “extract template” from an existing site
Custom sites via remote
provisioning in Office 365
DEMO
Do’s:
#2 Use Office 365
apps in preference
to SharePoint Add-
ins
Using Office 365 APIs
• SharePoint add-in authentication sucks!
• Less and less reason to build a SharePoint add-in. Consider:
• SP add-ins need to be installed to sites
• SP add-ins must be accessed from SharePoint – not standalone
• Office 365 app authentication can now talk to SharePoint. Technique:
Authenticate to
Office 365/Azure
AD
Get access token
Use token with
CSOM/REST
Office 365
app? SharePoint
Add-in?
Options for Azure AD auth
“User + app” authentication
• Authorization Code Grant Flow
• Implicit Grant Flow
“App-only” authentication
• Client Credentials Grant Flow
Using an Office 365 auth
token to talk to SharePoint
DEMO
More debatable/controversial
don’ts:
#4 Don’t use web
parts
Do’s:
#3 Use app script
parts (cloud-friendly
web parts)
App script parts
Web part definition
= Script Editor Web
Part + custom
JavaScript
Output a DIV onto
page
JavaScript injects
content into DIV
App script parts (modern
web parts)
DEMO
App script parts - advanced
• Sometimes you need “web part properties”
• This involves:
• Storing the data
• Presenting the UI
• Options:
• Persist somewhere custom
• Persist to Script Editor config (hidden field) – see
https://olescorner.wordpress.com/2015/06/04/49
Do’s:
#4 Create multiple
tenancies (if doing
development)
Using multiple Office 365 tenancies for
dev/test/prod
• YES it costs more!
• BUT, several SharePoint elements are global:
• Change something here whilst developing in a tenant = changed for
everyone!
• TIPS – use small number of users, and maybe lower plan level
Summary – what to take away
• BUT, consider whether guidance is 100% appropriate for your
case
• A custom master page and/or web template is NOT crazy for a
publishing intranet!
(But it might be for collaboration sites)
Old approach Consider..
Custom master page Office 365 themes. Custom CSS file.
Web templates/features for provisioning Remote provisioning
Web part App script part
Resources
• Training section on
http://dev.office.com
• PnP remote provisioning solution -
webcast
• http://cob-sp.com/1MjPJ7u
• Avoid customizing ODFB sites – webcast:
• http://cob-sp.com/1Oz2Vv2
• App script web part with properties:
• http://cob-sp.com/1kkloi8
• (By Ole Martin Pettersen)
Hackathon
WINNING TEAM GETS
THANK YOU!
ANY QUESTIONS?
Chris O’Brien
www.sharepointnutsandbolts.com

Weitere ähnliche Inhalte

Was ist angesagt?

SharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, WorkflowSharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, Workflow
Jonathon Schultz
 
Custom Applications - What, When, and Why
Custom Applications - What, When, and WhyCustom Applications - What, When, and Why
Custom Applications - What, When, and Why
Greg Hurlman
 
How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010
Jeremy Thake
 

Was ist angesagt? (20)

Activate bots within SharePoint Framework
Activate bots within SharePoint FrameworkActivate bots within SharePoint Framework
Activate bots within SharePoint Framework
 
SharePoint Framework - Developer Preview
SharePoint Framework - Developer PreviewSharePoint Framework - Developer Preview
SharePoint Framework - Developer Preview
 
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developersChris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
 
TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
SPUnite17 SPFx Extensions
SPUnite17 SPFx ExtensionsSPUnite17 SPFx Extensions
SPUnite17 SPFx Extensions
 
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
[Patel] SPFx: An ISV Insight into latest Microsoft's customization model
 
Application innovation & Developer Productivity
Application innovation & Developer ProductivityApplication innovation & Developer Productivity
Application innovation & Developer Productivity
 
SharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, WorkflowSharePoint 2010 - InfoPath, Workflow
SharePoint 2010 - InfoPath, Workflow
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
SharePoint Development with the SharePoint Framework
SharePoint Development with the SharePoint FrameworkSharePoint Development with the SharePoint Framework
SharePoint Development with the SharePoint Framework
 
Custom Applications - What, When, and Why
Custom Applications - What, When, and WhyCustom Applications - What, When, and Why
Custom Applications - What, When, and Why
 
SharePoint for ASP.Net Developers
SharePoint for ASP.Net DevelopersSharePoint for ASP.Net Developers
SharePoint for ASP.Net Developers
 
Modern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio CodeModern SharePoint Development using Visual Studio Code
Modern SharePoint Development using Visual Studio Code
 
Getting Started with SharePoint Development
Getting Started with SharePoint DevelopmentGetting Started with SharePoint Development
Getting Started with SharePoint Development
 
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft StreamECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
ECS19 - Michael Greth - Best Practice with Company Video on Microsoft Stream
 
ECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sitesECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sites
 
How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010How we built nothingbutsharepoint.com on sharepoint 2010
How we built nothingbutsharepoint.com on sharepoint 2010
 
Chris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutionsChris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutions
 

Andere mochten auch

Organizational Issues
Organizational IssuesOrganizational Issues
Organizational Issues
jessmc1
 
Professional telephone etiquette
Professional telephone etiquetteProfessional telephone etiquette
Professional telephone etiquette
Isidro Buenaobra
 
Ethical issues in organizational behavior
Ethical issues in organizational behaviorEthical issues in organizational behavior
Ethical issues in organizational behavior
ccrumly
 
Ethics in the workplace
Ethics in the workplaceEthics in the workplace
Ethics in the workplace
viviandabu
 
Basic telephone skills
Basic telephone skillsBasic telephone skills
Basic telephone skills
Hari Nair
 

Andere mochten auch (20)

OFFICE MANNERS
OFFICE MANNERSOFFICE MANNERS
OFFICE MANNERS
 
Office manners copy
Office manners   copyOffice manners   copy
Office manners copy
 
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
 
Topic6.1 managing career_career_management
Topic6.1 managing career_career_managementTopic6.1 managing career_career_management
Topic6.1 managing career_career_management
 
Organizational Issues
Organizational IssuesOrganizational Issues
Organizational Issues
 
Entering the work place
Entering the work placeEntering the work place
Entering the work place
 
Mutation of land
Mutation of landMutation of land
Mutation of land
 
Fagmøte om Omni-Channel Marketing - Agenda
Fagmøte om Omni-Channel Marketing - AgendaFagmøte om Omni-Channel Marketing - Agenda
Fagmøte om Omni-Channel Marketing - Agenda
 
Professional telephone etiquette
Professional telephone etiquetteProfessional telephone etiquette
Professional telephone etiquette
 
Ethical issues in organizational behavior
Ethical issues in organizational behaviorEthical issues in organizational behavior
Ethical issues in organizational behavior
 
Ethics in the workplace
Ethics in the workplaceEthics in the workplace
Ethics in the workplace
 
Presentation: Telephone Etiquette
Presentation: Telephone EtiquettePresentation: Telephone Etiquette
Presentation: Telephone Etiquette
 
Basic telephone skills
Basic telephone skillsBasic telephone skills
Basic telephone skills
 
Successful innovators don't care about innovating
Successful innovators don't care about innovatingSuccessful innovators don't care about innovating
Successful innovators don't care about innovating
 
Office Etiquette
Office EtiquetteOffice Etiquette
Office Etiquette
 
Etiquette and good manners
Etiquette and good mannersEtiquette and good manners
Etiquette and good manners
 
Workplace etiquette & manners
Workplace etiquette & mannersWorkplace etiquette & manners
Workplace etiquette & manners
 
Conflict management
Conflict managementConflict management
Conflict management
 
Conflict Management
Conflict ManagementConflict Management
Conflict Management
 
Conflict resolution
Conflict resolutionConflict resolution
Conflict resolution
 

Ähnlich wie Do's and don'ts for Office 365 development

Spca2014 chris o brien modern share-point development - techniques for off-...
Spca2014 chris o brien   modern share-point development - techniques for off-...Spca2014 chris o brien   modern share-point development - techniques for off-...
Spca2014 chris o brien modern share-point development - techniques for off-...
NCCOMMS
 
Introduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure FunctionsIntroduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure Functions
BIWUG
 

Ähnlich wie Do's and don'ts for Office 365 development (20)

O365: Attack of the Clones
O365: Attack of the ClonesO365: Attack of the Clones
O365: Attack of the Clones
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
 
Pearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET DeveloperPearls and Must-Have Tools for the Modern Web / .NET Developer
Pearls and Must-Have Tools for the Modern Web / .NET Developer
 
SharePoint 2013 App or Not to App
SharePoint 2013 App or Not to AppSharePoint 2013 App or Not to App
SharePoint 2013 App or Not to App
 
Drew madelung sp designer workflows - sp-biz
Drew madelung   sp designer workflows - sp-bizDrew madelung   sp designer workflows - sp-biz
Drew madelung sp designer workflows - sp-biz
 
Spca2014 chris o brien modern share-point development - techniques for off-...
Spca2014 chris o brien   modern share-point development - techniques for off-...Spca2014 chris o brien   modern share-point development - techniques for off-...
Spca2014 chris o brien modern share-point development - techniques for off-...
 
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
Rencore Webinar: SharePoint Customizations - the most overlooked road block t...
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
Deep dive into share point framework webparts
Deep dive into share point framework webpartsDeep dive into share point framework webparts
Deep dive into share point framework webparts
 
April 2020 Microsoft 365 Need to Know Webinar
April 2020 Microsoft 365 Need to Know WebinarApril 2020 Microsoft 365 Need to Know Webinar
April 2020 Microsoft 365 Need to Know Webinar
 
Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013Nsc 2013 06-17 - random rants on 2013
Nsc 2013 06-17 - random rants on 2013
 
SharePoint Development
SharePoint DevelopmentSharePoint Development
SharePoint Development
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
 
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
#SPSBrussels 2017 vincent biret #azure #functions microsoft #flow
 
Introduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure FunctionsIntroduction to Microsoft Flow and Azure Functions
Introduction to Microsoft Flow and Azure Functions
 
Lifecycle Management with SharePoint Apps and Solutions
Lifecycle Management with SharePoint Apps and SolutionsLifecycle Management with SharePoint Apps and Solutions
Lifecycle Management with SharePoint Apps and Solutions
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
October 2018 Office 365 Need to Know Webinar
October 2018 Office 365 Need to Know WebinarOctober 2018 Office 365 Need to Know Webinar
October 2018 Office 365 Need to Know Webinar
 
SharePoint Saturday Kansas 2015 - Building Killer Office365 Public Sites
SharePoint Saturday Kansas 2015 - Building Killer Office365 Public SitesSharePoint Saturday Kansas 2015 - Building Killer Office365 Public Sites
SharePoint Saturday Kansas 2015 - Building Killer Office365 Public Sites
 
SPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flowSPS calgary 2017 introduction to azure functions microsoft flow
SPS calgary 2017 introduction to azure functions microsoft flow
 

Mehr von Chris O'Brien

Mehr von Chris O'Brien (16)

Chris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing workChris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing work
 
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmapsChris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
 
COB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportCOB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline support
 
COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018
 
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienCustomizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
 
SP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienSP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'Brien
 
Getting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'BrienGetting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'Brien
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
 
Automated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 DevelopmentAutomated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 Development
 
Optimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet SitesOptimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet Sites
 
Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2
 
Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1
 
SharePoint workflow deep-dive
SharePoint workflow deep-dive SharePoint workflow deep-dive
SharePoint workflow deep-dive
 
SharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tipsSharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tips
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Do's and don'ts for Office 365 development

  • 1. Do’s and Dont’s for Office 365 Development Chris O’Brien - MVP
  • 2. Independent Consultant Head of Development, Content and Code www.sharepointnutsandbolts.com @ChrisO_Brien http://cob-sp.com/COBLinkedIn About me
  • 3. Agenda • The Office 365 dev landscape – things you CAN’T do • The DON’T list: • 4 fundamental don’ts • 4 “more debatable” don’ts  • The DO list • Remote provisioning • Office 365 apps/auth over SharePoint Add-ins • App script parts • Summary
  • 4. Office 365 dev – things you CAN’T do Farm solutions (WSPs) • No feature receivers • No timer jobs • No event receivers Non-sandbox SharePoint API code • No custom field controls • No site definitions • Etc.. The following are 100% NOT SUPPORTED in Office 365:
  • 6. Don’t #1 - don't use the sandbox APIs Why not: • Microsoft are likely to disable server- side code in SharePoint Online What you CAN do: • Use client-side code (e.g. JavaScript) • Use remote server-side code (e.g. the add-in model)
  • 7. Don’t #2 - don't customize the suite bar Why not: • Microsoft need to “own” this – new functionality may appear here • JavaScript/CSS hacks may conflict with Microsoft changes • Consistency across tenants What you CAN do: • Add a logo/ background image • Change the color via Office 365 themes
  • 8. Don’t #3 - don't rely on Office 365 HTML* Why not: • Microsoft need to change this from time to time • It is NOT an API or contract What you CAN do: • Provide your own HTML – master page, layouts, display templates etc. (*or at least, be VERY careful!)
  • 9. Don’t #4 - don't customize ODFB sites Why not: • Microsoft need to “own” this – new functionality may appear here • Now considered part of the service, like Delve • Becoming more like a doc lib, rather than full site Guidance webcast: • http://cob-sp.com/1Oz2Vv2
  • 10. Fundamental “don’ts” summary: 1. Don’t use the sandbox APIs 2. Don’t customize the suite bar 3. Don’t rely on Office 365 HTML 4. Don’t customize ODFB sites
  • 11. Do’s: 1. Do use Office 365 themes/suite bar options 2. Do use remote APIs: 1. CSOM (.NET) 2. JSOM 3. REST 4. Android/iOS
  • 12. More controversial don’ts 1. Don’t use a custom master page 2. Don’t use a custom web template 3. Don’t use Features to provision fields and content types ..also: 1. Don’t use web parts
  • 14. Don’t use a custom master page! WHAT?? • This is the recommended approach to branding since SharePoint 2007! • Easy way to control all pages in a site (e.g. global navigation, footer etc.) Why not: • Microsoft will update OOTB master pages with new functionality
  • 15. Office 365 updates and your master page Time OOTB Master Custom Master<< Copy >> Service updates for introducing new version of the out of the box master page with some new capabilities or bug fixes. Significant differences on the outcome unless custom master page been updated during the releases. New custom master page is created by copying oob master or starting from scratch using oob master as the reference master Seattle.master Version 1.0 master Seattle.master Version 2.0 master Seattle.master Version 3.0 master contoso.master Version 1.0 master contoso.master Version 1.0 master contoso.master Version 1.0
  • 16.
  • 17. Untested updates can be dangerous! The scenario: • Intranet with 50,000 users • OOTB master page, with some custom CSS/JavaScript Untested O365 change = broken intranet
  • 18. Strategies for dealing with this 1. Explicitly CHOOSE to use a custom master page – SOME protection? N.B. This involves “paying the customization tax” – you need to copy any Microsoft updates 2. Always have a First Release-enabled tenant
  • 19. Deciding whether to use a custom master page Other factors: • Responsive design? • Can CSS achieve the requirements?
  • 21. Don’t use custom WebTemplates! Why not: • It’s the same deal as custom master pages – Microsoft will want to update e.g. the team site definition
  • 22. Maintenance challenge with web templates Time Team Site Custom Web Template <xml> onet.xml X feature activations <xml> onet.xml X feature activations <xml> onet.xml X feature activations +2 <xml> onet.xml X feature activations +4 <xml> onet.xml X feature activations <xml> onet.xml X feature activations << Copy >>
  • 23. More debatable/controversial don’ts: #3 Don’t use Features to provision fields/content types etc.
  • 24. Don’t use Features for provisioning Why not: • Provisioned artifacts have dependency on Feature XML (in content database) • Microsoft don’t like this for running Office 365 BUT: • Is that the implementer’s problem? 
  • 25. Do’s: #1 Do use remote provisioning
  • 26. Remote provisioning – the alternative to WebTemplates • Better APIs for remote provisioning now • OfficeDev Patterns and Practices site provisioning framework: • XML for defining custom site “template” definition • Remote code (PowerShell or .NET) to create sites – Azure WebJob • Full engine/framework for creating sites from a SharePoint list item • Ability to “extract template” from an existing site
  • 27. Custom sites via remote provisioning in Office 365 DEMO
  • 28. Do’s: #2 Use Office 365 apps in preference to SharePoint Add- ins
  • 29. Using Office 365 APIs • SharePoint add-in authentication sucks! • Less and less reason to build a SharePoint add-in. Consider: • SP add-ins need to be installed to sites • SP add-ins must be accessed from SharePoint – not standalone • Office 365 app authentication can now talk to SharePoint. Technique: Authenticate to Office 365/Azure AD Get access token Use token with CSOM/REST Office 365 app? SharePoint Add-in?
  • 30. Options for Azure AD auth “User + app” authentication • Authorization Code Grant Flow • Implicit Grant Flow “App-only” authentication • Client Credentials Grant Flow
  • 31. Using an Office 365 auth token to talk to SharePoint DEMO
  • 33. Do’s: #3 Use app script parts (cloud-friendly web parts)
  • 34. App script parts Web part definition = Script Editor Web Part + custom JavaScript Output a DIV onto page JavaScript injects content into DIV
  • 35. App script parts (modern web parts) DEMO
  • 36. App script parts - advanced • Sometimes you need “web part properties” • This involves: • Storing the data • Presenting the UI • Options: • Persist somewhere custom • Persist to Script Editor config (hidden field) – see https://olescorner.wordpress.com/2015/06/04/49
  • 37. Do’s: #4 Create multiple tenancies (if doing development)
  • 38. Using multiple Office 365 tenancies for dev/test/prod • YES it costs more! • BUT, several SharePoint elements are global: • Change something here whilst developing in a tenant = changed for everyone! • TIPS – use small number of users, and maybe lower plan level
  • 39. Summary – what to take away • BUT, consider whether guidance is 100% appropriate for your case • A custom master page and/or web template is NOT crazy for a publishing intranet! (But it might be for collaboration sites) Old approach Consider.. Custom master page Office 365 themes. Custom CSS file. Web templates/features for provisioning Remote provisioning Web part App script part
  • 40. Resources • Training section on http://dev.office.com • PnP remote provisioning solution - webcast • http://cob-sp.com/1MjPJ7u • Avoid customizing ODFB sites – webcast: • http://cob-sp.com/1Oz2Vv2 • App script web part with properties: • http://cob-sp.com/1kkloi8 • (By Ole Martin Pettersen)
  • 42. THANK YOU! ANY QUESTIONS? Chris O’Brien www.sharepointnutsandbolts.com