Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary


Published on

SharePoint Saturday New York City - July 29, 2017

Published in: Software
  • ➤➤ How Long Does She Want You to Last? Here's the link to the FREE report ■■■
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

SPSNYC17 - The Wall: Overcoming SharePoint’s Site Collection Boundary

  1. 1. SharePoint Saturday New York City 2017 #SPSNYC Fotopedia The Wall: Overcoming SharePoint’s Site Collection Boundary Stacy DaSilva & Jonathan Ralton with Kathryn Birstein All trademarks and registered trademarks are the property of their respective owners.
  2. 2. Stacy DaSilva & Jonathan Ralton with Kathryn Birstein BlueMetal The Wall: Overcoming SharePoint’s Site Collection Boundary
  3. 3. Agenda Defining the Problem Site Lifecycles Taxonomy Workflows Navigation Custom Web Parts Wrapping Up Questions + demo! + demo! + demo! + demo!
  4. 4. US
  5. 5. Stacy DaSilva Senior 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
  6. 6. Jonathan Ralton Senior Information Architect • SharePoint professional/ consultant since 2005 • No coding! • Focused on document management, content management, knowledge management… • User Experience Design @jonralton 2014 ▪ 2015
  7. 7. Kathryn Birstein Senior 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 2014
  8. 8. YOU
  9. 9. What roles are you in? What are you hoping to learn?
  10. 10. Defining the Problem The Wall
  11. 11. NOT THIS WALL…
  12. 12. THIS WALL.
  13. 13. Consistency How can we ensure consistency across our sites with our content, business processes, the user experience, and customizations?
  14. 14. Componentry Is it possible to maintain workflows and web parts across multiple sites?
  15. 15. 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
  16. 16. 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
  17. 17. Topics Site Lifecycles Taxonomy Workflows Navigation Custom Web Parts
  18. 18. Site Lifecycles The Wall
  19. 19. 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
  20. 20. A Solution: Overview/Components SiteProvisioning •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 SiteTracking 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 SiteDeletion 1. PowerShell Script •Checks all active sites in Site Tracking List •Looks at LastModifiedItemDate of 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
  21. 21. PnP PowerShell PowerShell patterns-and-practices
  22. 22. 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
  23. 23. A Solution: Site Provisioning
  24. 24. 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
  25. 25. 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.
  26. 26. A Solution: Site Deletion
  27. 27. A Solution: Site Deletion
  28. 28. Site LifecyclesDEMONSTRATION
  29. 29. 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
  30. 30. 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.
  31. 31. Taxonomy The Wall
  32. 32. 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
  33. 33. 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
  34. 34. 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
  35. 35. Inheritance
  36. 36. Where do we define these? Site 1 Site 1.1 Site 1.1.1 Site 1.1.2 Site 1.2 Site 1.2.1 Site 1.3 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
  37. 37. A Solution: Overview/Components Content Type Publishing Managed Metadata
  38. 38. Where could we define these? 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 Publish
  39. 39. 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
  40. 40. 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
  41. 41. 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.
  42. 42. MANAGED METADATA def·i·ni·tion [dèffə nísh'n]
  43. 43. 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
  44. 44. 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 a a a a b c d d d d Locations Chicago New York Phoenix Watertown Washington
  45. 45. 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
  46. 46. 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
  47. 47. 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
  48. 48. 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
  49. 49. 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
  50. 50. 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
  51. 51. SharePoint Hybrid We now have some support from Microsoft for utilizing term sets across Office 365 and your local SharePoint installation(s)!
  52. 52. TaxonomyDEMONSTRATION
  53. 53. Timer Jobs Timer Job Description Default Schedule Content type hub Tracks 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
  54. 54. Cross-Site Publishing Cross-Site Publishing
  55. 55. 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.
  56. 56. Workflows The Wall
  57. 57. 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
  58. 58. The Challenge 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
  59. 59. Solutions PowerShell Visual Studio Third-Party Tools Future ?
  60. 60. PowerShell Site Provisioning Commands New-PnPProvisioningTemplate Apply-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-PnPWorkflowDefinition Add-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
  61. 61. 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
  62. 62. Third-Party Tools
  63. 63. Third-Party Tools
  64. 64. Future
  65. 65. Navigation The Wall
  66. 66. 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
  67. 67. 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
  68. 68. JavaScript Injection • Limitation/concerns about response time/load time • Use a CDN if you can
  69. 69. 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
  70. 70. NavigationDEMONSTRATION
  71. 71. 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
  72. 72. Custom Web Parts The Wall
  73. 73. 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
  74. 74. 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.
  75. 75. Centralized/Shared File
  76. 76. Local HTM File
  77. 77. Custom Web PartsDEMONSTRATION
  78. 78. 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
  79. 79. 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.
  80. 80. Wrapping Up The Wall
  81. 81. The Wall SharePoint’s site collection boundary can be overcome in various aspects by taking different approaches depending on the problem at hand.
  82. 82. 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
  83. 83. 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?
  84. 84. Questions The Wall
  85. 85. 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 evaluations 27 in Curved Samsung Lenovo IdeaPad Name your game bundle
  86. 86. THANK YOU EVENT 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!
  87. 87. Beer Authority 300 W 40h St [across the street] Join us for a round of drinks & some appetizers
  88. 88. Reference The Wall
  89. 89. Demo Code Download SPSNYC17-The_Wall-Demo
  90. 90. 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
  91. 91. Resources Workflows Compliance Overview of Workflows Included with Site-Based Retention Policies Workflows in SharePoint Taxonomy Guidance for Modifying Pre-Defined
  92. 92. Resources SharePoint 2013 SharePoint 2016 SharePoint Online Resources for IT Pros Features and Editions Discontinued and Modified Functionality Limits and