View
151
Download
0
Category
Preview:
Citation preview
SharePoint Saturday New York City 2017
#SPSNYC
Fotopedia
The Wall: Overcoming SharePoint’s Site Collection Boundary
Stacy DaSilva & Jonathan Ralton with Kathryn BirsteinAll trademarks and registered trademarks are
the property of their respective owners.
Stacy DaSilva & Jonathan Ralton with Kathryn BirsteinBlueMetal
The Wall: Overcoming SharePoint’s Site Collection Boundary
AgendaDefining the Problem
Site Lifecycles
Taxonomy
Workflows
Navigation
Custom Web Parts
Wrapping Up
Questions
+ demo!
+ demo!
+ demo!
+ demo!
US
Stacy DaSilvaSenior Software Engineer
• SharePoint developer since 2011
• Focused on custom development and providing solutions to solve complex SharePoint business processes
• About 8 months into a human cloning experiment
anastasiad@bluemetal.com
czerwsup.wordpress.com
linkedin.com/in/anastasiadasilva
Jonathan RaltonSenior Information Architect
• SharePoint professional/consultant since 2005
• No coding!
• Focused on document management, content management, knowledge management…
• User Experience Design
@jonralton
jonathanr@bluemetal.com
blog.jonralton.net
linkedin.com/in/jonathanralton
2014 ▪ 2015
Kathryn BirsteinSenior Software Engineer
• SharePoint consultant for past 10 years
• Previously an independent consultant for major firms including JPMorgan, UBS, TIAA, Federal Reserve Bank for 20 years
@kbirstein
kathryn.birstein@bluemetal.com
www.kbirstein.com
linkedin.com/in/kbirstein
2014
YOU
What roles are you in?
What are you hoping to learn?
Defining the ProblemThe Wall
NOT THIS WALL…
THIS WALL.
Consistency
How can we ensure consistency across our sites with our content, business processes,
the user experience, and customizations?
Componentry
Is it possible to maintain workflows and web parts across multiple sites?
SharePoint Server
Farm
Web Application
Content Database
Site Collection
Site List/Library
Item
Item
Site Collection
Site List/Library Item
Site List/Library Item
Content Database
Site Collection
Site List/Library Item
Web Application
Content Database
Site Collection
Site
List/Library
Item
Item
List/Library ItemSite Collection
Site
SharePoint Online
Tenant
Site Collection
Site List/Library
Item
Item
Site Collection
Site List/Library Item
Site List/Library Item
Site Collection
Site List/Library Item
Site Collection
Site
List/Library
Item
Item
List/Library ItemSite Collection
Site
Topics
Site Lifecycles
Taxonomy Workflows NavigationCustom
Web Parts
Site LifecyclesThe Wall
The Challenge
Goals
• Successfully manage a large number of sites and site collections• Create identical sites on an as-
needed basis
• Know exactly what sites and site collections are currently in existence
• Track unused sites and provide a method for removal
Hurdles• Site creation by hand is a very slow
and tedious process with a lot of room for human error
• SharePoint “Save Site as Template” is not very robust and is not available for publishing sites, and also… deprecated
• No UI available for easily seeing all existing sites and info about them beyond what Central Admin or Tenant Admin gives you
A Solution: Overview/ComponentsSi
te P
rovi
sio
nin
g •1. Site Request List
•2. PowerShell Script
•Builds out sites to exact specifications
•Preferred method is specific PnP code
•New-PnPWeb•New-PnPList•Add-PnPWebPart
•Could also use Provisioning Template commands
•3. Scheduled Job
•To run the script at prescribed interval
•Remote Timer Job (Azure) if SharePoint Online
Site
Tra
ckin
g 1. Site Tracking List
•List item added/populated at time of site provisioning
•Holds all sites, their URLs and other details such as provisioned date
•List can be used by admins to keep track of all sites, their locations and usage status
Site
Del
etio
n 1. PowerShell Script
•Checks all active sites in Site Tracking List
•Looks at LastModifiedItemDateof each web—if inactive for a certain period of time, initiate delete sequence
•Updates Site Tracking List if deletes occur
2. Scheduled Job
•To run the script at prescribed interval
•Remote Timer Job (Azure) if SharePoint Online
PnP PowerShell
PowerShell
dev.office.com/patterns-and-practices
PnP PowerShell
The easiest way to get the PNP PowerShell commands is to install them from the gallery. Or, you can use the MSIs.
1. Open PowerShell by right-clicking on your PowerShell icon. Run it as an administrator.
2. At the PowerShell prompt, type:
3. If you want to install the NuGet Provider, type Y. Press Enter.
4. If you trust the PSGallery, type Y. Press Enter.
In approximately 30 seconds to one minute, the module will be downloaded and installed for you.
SharePoint Server 2013 Install-Module SharePointPnPPowerShell2013
SharePoint Server 2016 Install-Module SharePointPnPPowerShell2016
SharePoint Online Install-Module SharePointPnPPowerShellOnline
A Solution: Site Provisioning
A Solution: Site Provisioning
• Could run workflow on each list item to obtain approval, etc. prior to allowing the site to be provisioned
• Could also run workflows to alert people when their site is complete/ready
• Could use metadata of list items to influence what the script does when the site gets created
A Solution: Site Tracking
• Could secure each list item accordingly or place in secured folders and present collapsed view
• Could also just maintain one combined list with requests as long as status indicator allows filtering out rejected sites, etc.
A Solution: Site Deletion
A Solution: Site Deletion
Site
LifecyclesDEMONSTRATION
Site Based Retention Policies
• Compliance features of SharePoint have been extended to sites in SharePoint 2013
• We can create and manage retention policies, and they will apply to SharePoint sites and any Exchange Server 2013 team mailboxes that are associated with the sites
• Based on create date, not activity date
• Site collection scoped, unfortunately
Summary
Using SharePoint PnP PowerShell commands, custom lists, and timer jobs, we…
1. Provided custom self-service site creation
2. Allowed for instantiating our own lists, libraries, and web parts on pages
3. Created a place for users to consume an index of sites
4. Provided custom automated site deletion
augmenting OOTB capabilities to manage site collection lifecycles across a web application/farm or tenant.
TaxonomyThe Wall
The Challenge
Goals
• Make things findable
• Make things usable
• Consistency
Hurdles
• Divergent and/or duplicative taxonomies can grow independent of each other within isolated site collections and subsite hierarchies
• Can instantiate identical constructs with code/features, but they can’t easily be centrally updated/maintained
Why do we use a content type?
“a reusable collection of:
1. metadata (columns),
2. workflow,
3. behavior, and other
4. settings
for a category of items or documents in a…list or document library”
– Microsoft
Why do we use a site column?
“a reusable column definition, or template,
that you can assign to multiple lists across multiple SharePoint
sites”
– Microsoft
Inheritance
Where do we define these?
Site 1
Site 1.1Site 1.1.1
Site 1.1.2
Site 1.2 Site 1.2.1
Site 1.3
Site 1
Site 1.1Site 1.1.1
Site 1.1.2
Site 1.2 Site 1.2.1
Site 1.3
Site 2Site 2.1 Site 2.1.1
Site 2.2Site 3
A Solution: Overview/Components
Content Type Publishing
Managed Metadata
Where could we define these?
Content Type Hub
Site 1
Site 1.1Site 1.1.1
Site 1.1.2
Site 1.2 Site 1.2.1
Site 1.3
Site 2Site 2.1 Site 2.1.1
Site 2.2Site 3
Publish
Content Type Publishing
Advantages
• Manage ‘Enterprise Content Types’ across site collections, web applications, and farms
• High governance/control
• Higher reuse
Disadvantages
• Inheritance/Publishing• Read Only
• Workflows
• Lookup Columns
• Backup/Restore/Disaster Recovery
• Site Columns
Content Type Publishing
SharePoint Server
• 0 to many Content Type Hubs
• Potential for Multiple SDLC Tiers, Multiple Farms…
SharePoint Online
• 1 Content Type Hub
• /sites/contenttypehub
Content Type Publishing
Publishing a content type does not make it immediately available for use by end users of a site… it must be attached to a library (document/document set/folder) or list (item/folder)!
Could employ PnP PowerShell to go through to desired sites and attach content types to lists/libraries.
MANAGED METADATA
def·i ·ni·tion [dèffə nísh'n]
Managed Metadata
“a way to refer to the fact that terms and term sets can be created and managed
independently from the columns themselves”
– Microsoft
Managed Metadata
Column Name/Purpose
a Office Location
b Shipped From
c Asset Location
d Contracted Locations
Term Store
Content Type Hub
Site 1
Site 1.1
Site 1.1.1
Site 1.1.2
Site 1.2 Site 1.2.1
Site 1.3
Site 2
Site 2.1 Site 2.1.1
Site 2.2
Site 3
a
a
a
a
a
a
a
a
a
aa
a
ab
c
dd
d
d
Locations
Chicago
New York
Phoenix
Watertown
Washington
Why would we use the term store?
• Distribute permissions for management of term sets
• Allow open term sets or submission of terms vs. closed term sets
• Easy for a non-developer to import terms
• Accessible via Taxonomy API• Client Side Object Model (CSOM)
• REST
• PowerShell
Term Sets
Local Term Set
Created within the context of a site collection
For example, if you add a column to a document library, and create a new term set to bind the column to, the new term set is local to the site collection that contains the document library
Global Term Set
Created outside the context of a site collection
For example, the term store administrator could create a term set group that is named Human Resources and designate a person to manage the term set group. The group manager would create term sets that relate to Human Resources, such as job titles and pay grades in the Human Resources term set group
Term Set Import
• Great way to get started• Can specify hierarchies
• Possible but limited• Can’t specify synonyms
• Can’t specify custom properties
• Can’t set custom sort order
• Can’t leverage reused terms, pinned terms
• Can’t influence GUID assignment
• No export without third party tool or custom development
SharePoint Managed Metadata Import Files
bit.ly/SPMMImport
Managed Metadata
A service application group can include multiple Managed Metadata service applications
• The sites within the Web applications display taxonomy, social tagging, and other features from both Managed Metadata service applications
• Unlike other cross-farm services, Web parts by default include data from multiple Managed Metadata service applications
Managed Metadata
Managed Metadata is one of the service applications that is typically deployed for dedicated use by a specific team or department
• To allow a team or department to manage their own taxonomy, hierarchies, keywords...
• SharePoint combines the results of multiple Managed Metadata service applications, so taxonomies, content types, and other elements can be shared across an organization
Managed Metadata
SharePoint Server
• 0 to many Managed Metadata Service Applications/Global Term Stores
• Potential for Multiple SDLC Tiers, Multiple Farms…
SharePoint Online
• 1 Managed Metadata Service Application/Global Term Store
SharePoint Hybrid
We now have some support from Microsoft for utilizing term sets across Office 365 and your local SharePoint installation(s)!
TaxonomyDEMONSTRATION
Timer Jobs
Timer Job Description Default Schedule
Content type hubTracks content type log maintenance and manages unpublished content types.
Daily
Content type subscriber
Retrieves content type packages from the hub and applies them to the local content type gallery. For more information about content types, see Plan to share term sets and content types in SharePoint Server 2013.
Hourly
Cross-Site Publishing
Cross-Site Publishing
Summary
Term Store
We can centrally manage/govern taxonomy and folksonomy.
Content Type Syndication
Via the Content Type Hub, we can centrally manage/govern definitions of types of content and various properties about those types such as workflow, retention policies, and metadata.
WorkflowsThe Wall
The Challenge
Goals
• Utilize the same workflow in different places in SharePoint• Identical workflows are often
needed across different team/project or other similarly created sites
• List workflows that target as specific list need to be identically implemented in templated sites
Hurdles
• Workflows are a site/site collection level item
• Cannot be shared from a central location
• Content Type Publishing can’t help with workflow proliferation
The Challenge
Site 1
Site 1.1Site 1.1.1
Site 1.1.2
Site 1.2 Site 1.2.1
Site 1.3
Site 2Site 2.1 Site 2.1.1
Site 2.2Site 3
Solutions
PowerShellVisual Studio
Third-Party Tools
Future ?
PowerShell
Site Provisioning Commands
New-PnPProvisioningTemplateApply-PnPProvisioningTemplate
• Requires staging (source) site that contains up-to-date version of the workflow(s)
• Copies entire site – including possibly undesired settings• Copies list workflows without need for XAML extraction• Can use other PnP commands to further customize the site
Workflow Commands
Add-PnPWorkflowDefinitionAdd-PnPWorkflowSubscription
• Requires staging (source) site that contains up-to-date version of the workflow(s)
• Requires exporting of workflows to extract XAML definition file• Attaches just the desired workflow to an existing site
Visual Studio
Pros
• Allows for custom server-side code to be utilized
Cons
• On-Premise only
• Requires WSP deployment and feature activation
• Requires comfort with Visual Studio/some coding expertise
Third-Party Tools
Third-Party Tools
Future
NavigationThe Wall
The Challenge
Goals
• Provide a reusable consistent mechanism to navigate across a portal made up of many site collections• OOTB
• Megamenu/Custom
• Add/remove or update a link in one place
Hurdles
• Difficult to go across site collections to reference one navigation structure with OOTB web parts
• Performance issues on page in loading megamenus, for example
Solutions
SharePoint Server
• OOTB: Managed Navigation
• Custom: Embedded ‘stuff’ in the master page or server-side C#
• Custom: Coded server-side web part
SharePoint Online
• OOTB: Managed Navigation
• Custom: JS injection
JavaScript Injection
• Limitation/concerns about response time/load time
• Use a CDN if you can
Managed Navigation
1. You need a term set• You cannot reuse the same term set in a different site collection
• Global Term Store vs. Site Collection Term Store
2. You need reused and/or pinned terms (w/children)• Limitations
3. You need a Publishing site or Publishing features
4. You need to enable Managed Navigation• Global and/or Current
NavigationDEMONSTRATION
Summary
OOTB
Managed Navigation is your only option
Custom
Various approaches with their own pluses and minuses as far as coding difficulty, implementation method, and user experience
Custom Web PartsThe Wall
The Challenge
Goals
• Use the same web part across site collections
• If an update needs to be made to a web part, only make the update in one place vs. in every site collection
Hurdles• Content Editor content link property
cannot point to a file outside the site collection
• SharePoint Online• Can only use client-side code• OOTB web part properties cannot reach
outside of a site collection• Don’t want a web part code file in every site
collection—any change would need to be pushed to every site collection
• SharePoint Server• When web part files are re-deployed,
sometimes features needs to be de- and re-activated—not ideal for every site collection
A Solution: Overview/Components
1. Specific File Structure• Centralized/Shared File
• Stored in a centralized site collection that all users have access to (SharedAssets)• Contains the bulk of web part code• All site collections will point to this code to allow for a single code change to take effect across
multiple locations
• Local HTM file• Small generic file that does as little as possible—points to centralized code• Saved in a library on every site collection (LocalWebPartFiles)• Can be updated if need be with PnP re-pushing out the files
2. PowerShell Script• PnP commands used for repeatable deployments and updates
3. Client-Side Code• JavaScript, Angular, etc.
Centralized/Shared File
Local HTM File
Custom
Web PartsDEMONSTRATION
SharePoint Framework
• SPFx web parts can be made available across your tenant using the app model.
• SharePoint Online• Modern Pages
• Classic Pages
• SharePoint 2016 Feature Pack 2
Summary
Using a combination of local files that point to centralized files, SharePoint PnP PowerShell commands, and client-side code, we…
1. Provided centrally housed web part code/configurations
2. Allowed for updating in one place
augmenting OOTB capabilities to manage web parts across a web application/farm or tenant.
Wrapping UpThe Wall
The Wall
SharePoint’s site collection boundary can be overcome in various aspects by taking different approaches depending on the
problem at hand.
Developer as the Programmer
You have to be a multi-faceted developer to solve today’s evolving SharePoint challenges, whether on-premise or online.
Traditional coding
PowerShell scripting
Client-side development
OOTB capabilities and configurations
Developer as the Consultant
Because there are so many approaches,
when someone asks you to implement
something, pause and ask yourself—is what they asked me to do it
the best way?
QuestionsThe Wall
EVALS / PRIZES
Bring all items to the 6th Info Desk
• Bingo Cards = how you win prizes at
the end of the event.
• The cards must be stamped by ALL the
Sponsors by the last session (4pm)
• Fill out speakers evaluations (located in
the front of the rooms
• Fill out the event evaluations27 in Curved Samsung
Lenovo IdeaPad
Name your game bundle
THANK YOUEVENT SPONSORS
We appreciated you supporting the
New York SharePoint Community!
• Diamond, Platinum, Gold, & Silver have
tables scattered throughout
• Please visit them and inquire about their
products & services
• To be eligible for prizes make sure to get
your bingo card stamped by ALL sponsors
• Raffle at the end of the day and you must be
present to win!
Beer Authority
300 W 40h St
[across the street]
Join us for a round of drinks & some
appetizers
http://www.beerauthoritynyc.com
ReferenceThe Wall
Demo Code
Download SPSNYC17-The_Wall-Demo Code.zip
Resources
Content Type Publishing Managed Metadata
Introduction to Content Types and Content Type Introduction to Managed Metadata
Publish a content type from a content publishing hub Managed Metadata Overview
Manage content type publishing Managed Metadata Planning
Activate a content type syndication hub Managed Metadata Service Application
Managed Navigation Overview
Plan Navigation Term Sets
Resources
Workflows Compliance
Overview of Workflows Included with Site-Based Retention Policies
Workflows in SharePoint
Taxonomy
Guidance for Modifying Pre-Defined
Resources
SharePoint 2013 SharePoint 2016 SharePoint Online
Resources for IT Pros bit.ly/1QrGndM
Features and Editions bit.ly/1HLZrfG bit.ly/SPO-Service
Discontinued
and Modified
Functionality
bit.ly/1bhrLKr
Limits and bit.ly/SP13-Limits bit.ly/28SJAGy bit.ly/SPO-Limits
Recommended