Patterns pour porter son code vers
Office 365
• #SPSParis D06
• Serge Luca
• 30 Mai 2015 / May 30th, 2015
Merci aux sponsors!Platinum
Gold/
Or
Silver/
Argent
Organizers/
Organisateurs
Thanks to our sponsors!
Raffle/
Tombola
10% de remise avec le code SPSPa15www.sharepointeurope.com
Serge Luca
Serge Luca
SharePoint MVP, Bruxelles
Consultant, speaker, trainer
Managing partner de www.ShareQL.com
SharePoint depuis 2001
Blog: http://sergeluca.wordpress.com/
sergeluca@ShareQL.com
@SergeLuca
Serge Luca
ShareQL
Isabelle Van Campenhoudt
MVP SQL Server
TheSQLgrrrl.wordpress.com
Bruxelles
Serge Luca
MVP SharePoint
Sergeluca.wordpress.com
Bruxelles
ShareQL.com
"The most strategic
developer surface area
for us is Office 365“
- Satya Nadella
Agenda
• Problématique
• L’initiative Office 365 Patterns & Practice (PnP)
• L’outil SPCAF
• Patterns et Démos
• Conclusions
Les faits
• Le FTC (Full Trusted Code) ne fonctionnera jamais dans Office
365 !
• Créer des add-ins au sens large : appels distants à SP (CAM =
Cloud App Model)
• Applications console
• PowerShell
• add-ins au sens strict (SharePoint ou Provider hosted)
• Microsoft n’abandonnera jamais l’API Server !
• Utilisé par les API clients
• Le branding via des Custom Master Pages est supporté dans
Office 365
• Dangereux et non conseillé par Microsoft
• Eviter le feature Framework
• Dépendance au file system
Transformation process
• Readiness with app
model topics
• Hosting decisions
• Network impact
analysis
• Development model
readiness
• Analyze existing
solution usage
• Analyze existing code
and functionality
• Concentrate on
business and
functional
requirements, not on
technology
• App model solution
planning and design
• What patterns and
models are used for
different solutions
• What solutions can be
converted to out of the
box capabilities
• Detailed technical
planning
• Actual app model
solution
implementation
• Typical development
process, including
testing
• App solution
deployment
• Existing content
retrofitting
• Farm solution
retraction
• Readiness
• Se plonger à fond dans Office 365 Patterns & Practice
• Se plonger à fond dans l’Office 365 API
• Se plonger à fond dans l’Office Graph
• Méfiance, tout n’est pas possible dans O365
• Assessment
• Utiliser l’outil SPCAF
https://github.com/OfficeDev/PnP/wiki
Demo : SPCAF
Principaux patterns avec les Add-Ins
Full trust (farm) solution Remote code/apps
Timer job Scheduled process in Azure (CSOM to read/write to
SP), or on Prem Console App
Master Page Javascript injection + css
Event receiver Remote event receiver, scheduled process, workflow
Custom field control JSLink or javascript injection
Site definition Remote provisioning solution
Run With Elevated Privileges App-only authentication
Custom web parts/user control App part, or JavaScript injection
Feature receiver, DelegateControl,
application page
None – but other approaches possible
Custom Master Page
• Full control on how
the site is rendered
• Applied one by one to
each site, except for
publishing sites
• Any updates to oob
master pages are not
automatically reflected
on the sites
• Use javascript injection
instead
Alternate CSS
• Can be used to
override whatever CSS
settings
• Control to color, fonts
and even layout
settings
• Configuration applied
to each site
• Can be used to
provide responsive
user experiences
Theme
• Can be used to control
branding, fonts and
background image of
the sites
• Configuration applied
to each site
Options
Flexibility
Cost impact
(short and
long term)
Support
Branding options for SharePoint sites
UnlimitedGoodAverageFair
Office 365 Themes
• Can be used to
centrally control
branding cross all
services in the Office
365
• Limited settings
currently
• Can be overridden in
site level
• Only in Office 365, not
in on-premises
http://blog.sharepointexperience.com/
Demo : Alternate CSS
Demo : Responsive
Design & CSS
Demo : javascript injection
instead of custom master
pages
Demo : javascript injection
instead of custom controls
Demo : JS links instead of
custom fields
Timer jobs
• Extrêmement utiles
• Solution 1. Console application On Prem – avec une tache Windows
(Task Scheduler)
• Solution 2.Console Application Azure Webjobs
• Danger : ne pas tomber dans l’excès de timer jobs, penser aux
workflows
• Remarque : il existe un TimerJob Framework dans PnP
Demo : timer jobs
Site Provisioning
• Un Site Provisioning framework est en cours de développement
• Permet de
• Télécharger le template d’un site
• Créer des sites ou des site collections sur base de ces templates
• D’appliquer les changements par rapport à un site de référence (deltas)
Le futur: Applications Office 365
• Avec l’Office 365 API
• Autorisation par application définie dans Azure AD par
l’Administrateur AD (« Common Consent Framework)
• OpenID et OAuth2
• Access token compatible avec ceux de SharePoint
Conclusions
• Toujours partir du fonctionnel
• Etudier les exemples O365 PnP
• Garder les patterns en tête
• Le Site Provisionning framework est important
• Le CAM est également utile On Prem (stabilité+rapidité de
migration)
• Office 365 API et Azure AD
Merci !
ivc@shareql.com
@thesqlgrrrl
sergeluca@shareql.com
@sergeluca
Thank you !
Merci !
Online evaluation form
Evaluations en ligne
http://tinyurl.com/SPSParis2015

Patterns pour porter son code SharePoint vers Office 365 (SharePoint Saturday Paris 2015)

  • 1.
    Patterns pour porterson code vers Office 365 • #SPSParis D06 • Serge Luca • 30 Mai 2015 / May 30th, 2015
  • 2.
  • 3.
    10% de remiseavec le code SPSPa15www.sharepointeurope.com
  • 4.
    Serge Luca Serge Luca SharePointMVP, Bruxelles Consultant, speaker, trainer Managing partner de www.ShareQL.com SharePoint depuis 2001 Blog: http://sergeluca.wordpress.com/ sergeluca@ShareQL.com @SergeLuca Serge Luca
  • 5.
    ShareQL Isabelle Van Campenhoudt MVPSQL Server TheSQLgrrrl.wordpress.com Bruxelles Serge Luca MVP SharePoint Sergeluca.wordpress.com Bruxelles ShareQL.com
  • 6.
    "The most strategic developersurface area for us is Office 365“ - Satya Nadella
  • 8.
    Agenda • Problématique • L’initiativeOffice 365 Patterns & Practice (PnP) • L’outil SPCAF • Patterns et Démos • Conclusions
  • 10.
    Les faits • LeFTC (Full Trusted Code) ne fonctionnera jamais dans Office 365 ! • Créer des add-ins au sens large : appels distants à SP (CAM = Cloud App Model) • Applications console • PowerShell • add-ins au sens strict (SharePoint ou Provider hosted) • Microsoft n’abandonnera jamais l’API Server ! • Utilisé par les API clients • Le branding via des Custom Master Pages est supporté dans Office 365 • Dangereux et non conseillé par Microsoft • Eviter le feature Framework • Dépendance au file system
  • 12.
    Transformation process • Readinesswith app model topics • Hosting decisions • Network impact analysis • Development model readiness • Analyze existing solution usage • Analyze existing code and functionality • Concentrate on business and functional requirements, not on technology • App model solution planning and design • What patterns and models are used for different solutions • What solutions can be converted to out of the box capabilities • Detailed technical planning • Actual app model solution implementation • Typical development process, including testing • App solution deployment • Existing content retrofitting • Farm solution retraction
  • 13.
    • Readiness • Seplonger à fond dans Office 365 Patterns & Practice • Se plonger à fond dans l’Office 365 API • Se plonger à fond dans l’Office Graph • Méfiance, tout n’est pas possible dans O365 • Assessment • Utiliser l’outil SPCAF
  • 15.
  • 19.
  • 21.
    Principaux patterns avecles Add-Ins Full trust (farm) solution Remote code/apps Timer job Scheduled process in Azure (CSOM to read/write to SP), or on Prem Console App Master Page Javascript injection + css Event receiver Remote event receiver, scheduled process, workflow Custom field control JSLink or javascript injection Site definition Remote provisioning solution Run With Elevated Privileges App-only authentication Custom web parts/user control App part, or JavaScript injection Feature receiver, DelegateControl, application page None – but other approaches possible
  • 22.
    Custom Master Page •Full control on how the site is rendered • Applied one by one to each site, except for publishing sites • Any updates to oob master pages are not automatically reflected on the sites • Use javascript injection instead Alternate CSS • Can be used to override whatever CSS settings • Control to color, fonts and even layout settings • Configuration applied to each site • Can be used to provide responsive user experiences Theme • Can be used to control branding, fonts and background image of the sites • Configuration applied to each site Options Flexibility Cost impact (short and long term) Support Branding options for SharePoint sites UnlimitedGoodAverageFair Office 365 Themes • Can be used to centrally control branding cross all services in the Office 365 • Limited settings currently • Can be overridden in site level • Only in Office 365, not in on-premises
  • 24.
  • 25.
  • 26.
  • 27.
    Demo : javascriptinjection instead of custom master pages
  • 28.
    Demo : javascriptinjection instead of custom controls
  • 29.
    Demo : JSlinks instead of custom fields
  • 30.
    Timer jobs • Extrêmementutiles • Solution 1. Console application On Prem – avec une tache Windows (Task Scheduler) • Solution 2.Console Application Azure Webjobs • Danger : ne pas tomber dans l’excès de timer jobs, penser aux workflows • Remarque : il existe un TimerJob Framework dans PnP
  • 31.
  • 32.
    Site Provisioning • UnSite Provisioning framework est en cours de développement • Permet de • Télécharger le template d’un site • Créer des sites ou des site collections sur base de ces templates • D’appliquer les changements par rapport à un site de référence (deltas)
  • 33.
    Le futur: ApplicationsOffice 365 • Avec l’Office 365 API • Autorisation par application définie dans Azure AD par l’Administrateur AD (« Common Consent Framework) • OpenID et OAuth2 • Access token compatible avec ceux de SharePoint
  • 36.
    Conclusions • Toujours partirdu fonctionnel • Etudier les exemples O365 PnP • Garder les patterns en tête • Le Site Provisionning framework est important • Le CAM est également utile On Prem (stabilité+rapidité de migration) • Office 365 API et Azure AD
  • 37.
  • 38.
    Thank you ! Merci! Online evaluation form Evaluations en ligne http://tinyurl.com/SPSParis2015

Notes de l'éditeur

  • #2 Template may not be modified Twitter hashtag: #spsparis for all sessions Keep the flags corresponding to your session
  • #7 Why? The key to enterprise productivity going forward Microsoft’s strategic advantage in the Enterprise Partners and Developers are key to its success
  • #11 Insister que le code server sera bien supporté dans le futur et qu’il n’est pas nécessaire de le transformer en code client si on n’a un gros investissement et qu’on n’a pas d’intérêt immédiat de passer dans le cloud Que dans le futur l’hybride sera populaire et donc que l’ancien code peut continuer à fonctionner Todo : parler de ceci https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/Transform-farm-solutions-to-the-SharePoint-app-model.md High trusted apps https://msdn.microsoft.com/library/office/fp179901(v=office.15)
  • #13 Insister sur le fait qu’on ne peut pas tout voir durant la session, on va parler du readiness, de l’assessment et de l’implémentation Lire https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/Transform-farm-solutions-to-the-SharePoint-app-model.md
  • #14 Méfiance : Ex la possibilité de configuer un document set n’est dispo que depuis l’update de mars 2015
  • #16 Insister que le code server sera bien supporté dans le futur et qu’il n’est pas nécessaire de le transformer en code client si on n’a un gros investissement et qu’on n’a pas d’intérêt immédiat de passer dans le cloud Que dans le futur l’hybride sera populaire et donc que l’ancien code peut continuer à fonctionner Todo : parler de ceci https://github.com/OfficeDev/PnP-Guidance/blob/master/articles/Transform-farm-solutions-to-the-SharePoint-app-model.md High trusted apps https://msdn.microsoft.com/library/office/fp179901(v=office.15)
  • #20 Workflow and app permission feature TaskContentType feature appinv.aspx <AppPermissionRequests> <AppPermissionRequest Scope="http://sharepoint/content/sitecollection/web" Right="FullControl" /> </AppPermissionRequests>
  • #24 http://blog.sharepointexperience.com/2015/02/sptechcon-austin-february-2015/#more-2766
  • #28 C:\Users\serge\Source\Repos\PnP3\Samples\Core.EmbedJavaScript Avec video http://channel9.msdn.com/Blogs/Office-365-Dev/JavaScript-injection-in-SharePoint-Online-Office-365-Developer-Patterns-and-Practices http://aaclage.blogspot.com/2013/12/how-to-include-user-custom-actions-and.html
  • #29 C:\Users\serge\Source\Repos\PnP3\Samples\Core.EmbedJavaScript.WeekNumbers
  • #30 C:\Users\serge\Source\Repos\PnP3\Samples\Branding.ClientSideRendering\Branding.ClientSideRendering +
  • #31 http://channel9.msdn.com/Blogs/Office-365-Dev/Simple-remote-timer-job-that-interacts-with-SharePoint-Online-Office-365-Developer-Patterns-and-Prac http://channel9.msdn.com/blogs/OfficeDevPnP/Introduction-to-the-PnP-timer-job-framework
  • #32 C:\Users\serge\Source\Repos\PnP3\Samples\Branding.ClientSideRendering\Branding.ClientSideRendering
  • #34 http://channel9.msdn.com/Events/Ignite/2015/BRK4117