10th annual conference about modern it technologies 2019... · 2019-11-14 · 10th annual...

26
10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Upload: others

Post on 08-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Page 2: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Todd Klindt

• 14 Year SharePoint MVP

• Writer, speaker, podcaster, consultant at Sympraxis Consulting, SysKit Chief Evangelist

[email protected]@toddklindtwww.toddklindt.comwww.toddklindt.com/Thrive2019

Page 3: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES

Marc D Anderson

• Co-Founder and President of Sympraxis Consulting, located in the Boston suburb of Newton, MA, USA. Sympraxis focuses on enabling collaboration throughout the enterprise using the SharePoint application platform.

• Over 35 years of experience in technology professional services and software development. Over a wide-ranging career in consulting as well as line manager positions, Marc has proven himself as a problem solver and leader who can solve difficult technology problems for organizations across a wide variety of industries and organization sizes.

• Author of SPServices• Awarded Microsoft MVP for SharePoint Server 2011-2020

New PnP repo: https://github.com/SharePoint/sp-usage-docs

Page 4: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Session Overview

Site Designs are a cool feature that let designers create sites from pre-defined templates. These templates can be simple from just adding lists, fields, and themes to very powerful where Flows are triggered or complicated post file creation logic is performed.

Page 5: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Thank you Sponsors #ThriveITconf

Silver

Evening event sponsor

Material

Media

Page 6: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Agenda

• What are Site Designs and what can you do with them?

• Information Architect’s view

• Building and Applying Site Designs

• Site Designs, Flow, and PnP PowerShell

• Re-Applying Site Designs

Page 7: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

The good, the bad, and the ugly:Save Site as Template

The Bad and the Ugly• Only worked for Classic Team sites – “cheating” on Publishing sites often broke• So flaky they removed it from SharePoint Online• No way to update sites once they are created• Brittle – content sometimes breaks (error when clicking on a list for example)• Difficult to debug; generally arcane

The Good• Easy peasy – make a sample of what you want, save as a template, then use

the template to create new site(s)

Page 8: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

It takes work to be this beautiful!

Page 9: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

• Can be…

• applied on site creation

• applied on association with a Hub Site

• updated over time and reapplied

• Requires thought about idempotence: an idempotent operation is one that has no additional effect if it is called more than once with the same input parameters.

Site Designs / Site Scripts

See: Idempotent Site Scripts for SharePoint

Page 10: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Using Site Scripts to Deploy Content Types

See: SharePoint site design and site script overview and Site design JSON schema: Define a new content type

Page 11: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Site designs: modern templating model

A new script model to apply custom “actions” to a site after creation.

This approach is inspired by the “remote provisioning” pattern we’ve espoused through PnP

Page 12: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

When to use site designs

• Updating existing sites with common site elements

• Configuring sites associated to a hub

Site Instances

Site Instances

Site Instances

Site Instances

Page 13: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Available Site Script Actions

JSON Schema: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema

Site Settings

• addPrincipalToSPGroup

• addNavLink

• removeNavLink

• applyTheme

• setSiteLogo

• setSiteBranding

• setRegionalSettings

• setSiteExternalSharingCapability

• triggerFlow

• joinHubSite

SharePoint Components Apps & Solutions

• createSPList

• addSPField

• deleteSPField

• addSPFieldXml

• createSiteColumn

• createSiteColumnXml

• addSiteColumn

• addContentType

• createContentType

• removeContentType

• addSPView

• removeSPView

• setSPFieldCustomFormatter

• installSolution

• SPFx Extension support• associateExtension

• associateListViewCommandSet

• associateFieldCustomizer

Page 14: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Anatomy of site designs & scripts"$schema": "schema.json",actions: [...{

"verb": "createSPList","listName": "Contoso Project Tracker","templateType": 100,"subactions": [

{"verb": "SetDescription","description": "Custom list to illustrate

SharePoint site scripting capabilities"},{

"verb": "addContentType","name": "Contoso Projects"

},{

"verb": "addSPFieldXml","schemaXml": "<Field Type=\"Choice\"

DisplayName=\"Project Status\" Required=\"FALSE\" Format=\"Dropdown\" StaticName=\"ProjectStatus\" Name=\"ProjectStatus\"><Default>In progress</Default><CHOICES><CHOICE>In progress</CHOICE><CHOICE>In review</CHOICE><CHOICE>Has issues</CHOICE><CHOICE>Done</CHOICE></CHOICES></Field>"

},{

"verb": "addSPView","name": "Contoso Projects by Status","viewFields":

...

Site Script: JSON file of actions to be applied to the site post-creation

Actions can be concatenated in single file or multiple files can be used (and reused)

Add-SPOSiteDesign-Title <string>-WebTemplate <string>-SiteScripts <SPOSiteScriptPipeBind[]>[-Description <string>][-PreviewImageUrl <string>][-PreviewImageAltText <string>][-IsDefault]

Site Design attributes designate display characteristics and target template

LIMITS• 100 site scripts and site designs per

tenant• 30 actions/design if applied sync

(Invoke-SPOSiteDesign)300 actions if applied async(UI or Add-SPOSiteDesignTask)

• 30K characters/design

Page 15: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Site Designs for Information Architecture

Page 16: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Similar to How We Built Template Sites in the Past

• Build out the lists and libraries you want in your sites

• Use PowerShell to export the lists and libraries into Site Scripts

• Get-SPOSiteScriptFromList -ListUrl $listUrl

• Combine the Site Scripts intoa Site Design

• Deploy the Site Design

• Create sites using the appropriate Site Design• Project site, Department site, Matter site, etc.

Coming soon – It’s here! export an entire site!Get-SPOSiteScriptFromWeb –WebUrl $siteUrl-IncludeTheming –IncludeBranding-IncludeSiteExternalSharingCapability–IncludeRegionalSettings–IncludeLists $relativeListUrls

Page 17: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

•Check the Github samples https://github.com/SharePoint/sp-dev-site-scripts

•Mix and match into a set of Site Scripts

Tips and Tricks – Github Samples

Page 18: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Use the Theme Generator to create a unique theme for each Site Design

https://aka.ms/themedesigner

Tips and Tricks – Create a Theme per Site Design

Page 19: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

DEMO: Export a list and apply a site designMarc

Page 20: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Add-SPOSiteScript -Title $siteScriptTitle –Content $siteScriptJson

Add-SPOSiteDesign -SiteScripts [$siteScript.Id]-Title $siteDesignTitle -WebTemplate $webTemplate-Description $siteDesignDescription-PreviewImageUrl $previewImageUrl-DesignPackageId $designPackageId

Grant-SPOSiteDesignRights -Identity $siteDesign.Id-Principals ("[email protected]")-Rights View

Set-SPOHubSite $hubSiteUrl -SiteDesignId $siteDesign.Id

Invoke-SPOSiteDesign -Identity $siteDesign.Id-WebUrl "https://contoso.sharepoint.com/sites/projectawesome"

Add-SPOSiteDesignTask -SiteDesignId $siteDesign.Id-WebUrl "https://contoso.sharepoint.com/sites/projectawesome"

Site Design PowerShell

Page 21: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Office Developer Patterns and Practices

Core Library

CSOM“15”

CSOM“16”

Remote Timer Job

Framework

Widget Wrangler

PowerShellCommands

https://github.com/OfficeDev/PnP

YOUR CODE HERE

SharePoint 2013

SharePoint 2016 and

Online

There is much more in the OfficeDev PnP library; this picture shows the components that will be discussed in this session.

Page 22: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

var flowScript = {"$schema": "schema.json","actions": [{

"primary_verb": "Flow.Trigger","target": “<<http post url>>","name": “contoso hr additions","parameters": {

"department": "HR","cost center": "1023"

}}

],"bindata": {},"version": 1

};

Site Scripts with app integrationHow to integrate custom logic into out-of-box provisioning flow

SharePoint Online

Storage Queue

Azure Function

Microsoft Flow

Site URL is used as a parameter to connect to site using remote APIs. Customizations applied using remote provisioning techniques, for example with PnP remote provisioning template model.

Script initiates previously configured flow, using the newly created site URL as parameter. Flow includes a step to pass site URL to Azure storage queue for delegating processing to Azure side.

1 2

3

4

triggerFlow script action• Site URL• Site Description• Created By• Creator Email• UTC Creation Time

Page 23: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Site Designs for Existing Sites!

PowerShell or REST can be used to apply a published design to a site.

Page 24: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

DemoRe-apply a site designMarc

Page 25: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

From Ignite

• Available now, or now-ish• Extract a Site Design

from a site (web)• Multiple lists,

branding, navigation

• Early Next Year• Support folders and

files• Teams template

integration• More actions

Page 26: 10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES 2019... · 2019-11-14 · 10TH ANNUAL CONFERENCEABOUT MODERN IT TECHNOLOGIES Marc D Anderson •Co-Founder and President of Sympraxis

10TH ANNUAL CONFERENCE ABOUT MODERN IT TECHNOLOGIES

Re

sou

rce

s

Kokkarinenhttp://bit.ly/UltimateGuide2SiteDesigns

http://bit.ly/SiteDesignOverview

http://bit.ly/SiteDesignSchema

http://bit.ly/SwoopingSiteDesigns

http://bit.ly/SwoopingSampleCode

http://bit.ly/SiteDesignAttachHubs

http://bit.ly/OfficeThemeGen