objectives - .net framework

22

Upload: others

Post on 16-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: objectives - .NET Framework
Page 2: objectives - .NET Framework
Page 3: objectives - .NET Framework

objectives

takeaways

Page 4: objectives - .NET Framework

A new provisioning flow providing two templates

Page 5: objectives - .NET Framework

for the modern workplace

Transformbusiness processes

Inform and engage people

Extend & develop

Page 6: objectives - .NET Framework

and extensible

custom site configurations and business processes

Page 7: objectives - .NET Framework

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 8: objectives - .NET Framework

Updating existing sites with common site elements

Configuring sites associated to a hub

Site Instances

Site Instances

Site Instances

Site Instances

Page 9: objectives - .NET Framework

Use PowerShell & REST to create and manage site designs and site scripts

Scoping visibility in self-service site creation

Applying to an existing site

PowerShell: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-powershellREST: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-rest-api

Page 10: objectives - .NET Framework

Demo – SSSC Configuration Approaches

create site script & associate to a site designapplying a site design as defaultscoping site designs

Page 11: objectives - .NET Framework

Site designs in site creation flow

Site Scripts -Actions• Create List• Apply Theme• Add to Nav• Trigger Flow• Join a hub site

Site design selections appear in site provisioning UX (per base template)

Execute Site Design

During site creation we create a parameter in site property bag – this is used by site design feature to apply site scripts.

2

3

After site creation script actions are initialized and processed – as each are run, they are saved to a local list and rendered in progress panel

1

Page 12: objectives - .NET Framework

"$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 (as of May 2018)• 100 site scripts and site designs• 30 cumulative actions and/or

30K character limit / site design

Page 13: objectives - .NET Framework

right now

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

Site Settings

• addPrincipalToSPGroup• addNavLink• applyTheme• setSiteLogo• 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: objectives - .NET Framework

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

};

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

34

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

Page 15: objectives - .NET Framework

Demo – site scripts deconstructedmodifying settingscreate/amend site componentsadding solutions

Page 16: objectives - .NET Framework

These designs are published globally and can be used on one or more hubs.

Page 17: objectives - .NET Framework

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

Page 18: objectives - .NET Framework

Demo

Apply to existing sites w/ Invoke-SPOSiteDesignApply to a site when joining a hub

Page 19: objectives - .NET Framework

Shipped since Ignite (September 2017)• Site Designs with updated JSON schema & extensibility point in S3C (Generally available)• Full set of REST and PowerShell commands for CRUD and scoping operations• Core set of site script actions: create lists and key list settings; site columns; declarative content

types; site regional and sharing settings; app catalog and SPFx extension registration; apply company themes; trigger Flow (for greater flexibility)

• REST and PowerShell support for applying to existing site collections (modern)

What’s Next!? • Additional triggers & entry points: on hub join; reusable selector from other workloads• Application to other site templates• More site script actions• Site script auditing; recall applied site design on-demand• Auto-extraction of select SP objects

Page 20: objectives - .NET Framework

Official Documentationhttps://aka.ms/spsitedesignshttps://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview

Open-Source Site Script Sampleshttp://aka.ms/spsitescriptsampleshttps://github.com/SharePoint/sp-dev-site-scripts

Recent Announcements:https://techcommunity.microsoft.com/t5/SharePoint-Blog/SharePoint-Site-Scripts-and-Site-Designs-April-2018-release/ba-p/181254

Page 21: objectives - .NET Framework

Make yourself heard! Help us prioritize!http://aka.ms/spdev-uservoicehttps://aka.ms/spsitedesignuservoice

SharePoint Tech Communityhttps://techcommunity.microsoft.com

Page 22: objectives - .NET Framework

Thank you!