SharePoint Online Development Best Practices

Slides:



Advertisements
Similar presentations
Getting Started with SharePoint 2013 Apps
Advertisements

Microsoft SharePoint 2010 technology for Developers
Designing, Deploying and Managing Workflow in SharePoint Sites Steve Heaney Product Development Manager OBS
Design Solutions for a SharePoint in Flux. Agenda © 2014 Jamie McAllister.
IntroductionThemes and other branding techniques Building response experiences Controls and other UX elements.
Build /16/2017 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
Development models for on-premises Transformation approaches Farm solution considerations.
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
Becky Bertram SharePoint MVP
©2012 Microsoft Corporation. All rights reserved..
Site Provisioning Options Web Template Fundamentals Web Templates and App Webs Custom Solutions for Site Provisioning Wrap Up.
Fraser Technical Solutions, LLC
©2012 Microsoft Corporation. All rights reserved. Content based on SharePoint 15 Technical Preview and published July Thierry Gasser TSP
App development in SharePoint 2013 LIVE Introducing Cloud App Model Cloud-hosted Apps Experiences from the Field.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Building Search Portals With SP2013 Search. 2 SharePoint 2013 Search  Introduction  Changes in the Architecture  Result Sources  Query Rules/Result.
Office 365 Platform Flexible Tools Understand different provisioning options and their advantages and disadvantages…
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Online Conference June 17 th and 18 th SharePoint Online Administration with PowerShell.
Microsoft ® Official Course Developing a Publishing Site for Web Content Microsoft SharePoint 2013 SharePoint Practice.
Module 9 User Profiles and Social Networking. Module Overview Configuring User Profiles Implementing SharePoint 2010 Social Networking Features.
Cloud Roadshow. Advanced SharePoint add-in Development.
| Basel Building real Business Apps with Office365/Azure Gilbert Nicolet – BPA Solutions SA.
Welcome to Azure App Services! Amie Seisay
Windows 8 Application Microsoft Word with an app for Office Internal O365 SharePoint Site Windows Azure Web Sites Windows Azure Workflow Service.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
Leveraging Web Content Management in SharePoint 2013 Christina Wheeler.
Both Dutch and Swedish nationality 20+ years of industry experience Living in Stockholm, Sweden MCSM, MCM, MVP, MCSE, MCSD, MCSA, MCPD, MCITP, MCTS PnP.
Office 365: Attack of the Clones! Building reusable site templates with the Office 365 PnP Framework.
Modern Development Technologies in SharePoint SHAREPOINT SATURDAY OMAHA APRIL, 2016.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Understanding and implementing the remote provision pattern in SharePoint.
Inspirirani ljudima. Ugasite mobitele. Hvala.. Paolo Pialorsi Senior Consultant PiaSys ( Publishing apps for SharePoint 2013 on Microsoft.
Leveraging SharePoint Search In SharePoint 2013 Jameson Bozeman.
Trimantra Software Solution Offshore Software Development Outsourcing Company Visit :
A Developer’s Introduction to SharePoint 2013 Apps Ryan McIntyre, MCITP, MCPD National
Virtual techdays INDIA │ November 2010 SharePoint 2010 – Your one stop shop for all portal requirements Saranya Sriram │ Developer Evangelist, Microsoft.
Converting SharePoint on- premise Apps to Office 365 Jos Auker-Woor M377.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
From SharePoint to Office 365 Development
Integrating SharePoint 2010 with Office 2010
What's new in the world of SharePoint development and deployment
SharePoint Provisioning Success with PnP PowerShell
Effective Client-side Coding against Office 365
Automate Custom Solutions Deployment on Office 365 and Azure
Line of Business Solutions in SharePoint Online
SPC Developer 6/25/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Who Needs a Developer for Automated SharePoint Provisioning?
9/3/ :15 PM Cloud Roadshow © 2014 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO.
Upgrading from Full Trust Code to Add-in Model and SharePoint Framework Paolo Pialorsi Senior Consultant - PiaSys.com Track: DEV | Level:
SharePoint Framework Extensions
Application Lifecycle Management – Best Practices for SharePoint and Office App development November 2015.
Understanding SharePoint Framework and Modern Development
Transforming SharePoint Farm Solutions to the Add-in Model
Multi-Farm, Cross-Continent SharePoint Architecture
Introduction to SharePoint Framework (SPFx)
Practical guide to build Modern Intranet sites with SharePoint Communication Sites Asish Padhy.
Introduction to SharePoint Framework
Windows Azure Keenan Newton 3-021
02 | Controlling branding in SharePoint using app model
Office 365 Development July 2014.
Vesa Juvonen | Senior Program Manager
03 | Site collection and site provisioning with app model
Site scripts and Site Design
SharePoint 2019 Overview and Use SPFx Extensions
SharePoint Development
Explore PnP Partner Pack for IT pros, admins and architects
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
PnP Partner Pack - Introduction
Presentation transcript:

SharePoint Online Development Best Practices November 2015

Agenda 1 2 3 4 Best Practices for Add-In Model Best Practices – SPO Development 3 Business User Driven Template 4 CSOM Based Customization Strategy Checkpoints

Best practices for add-in model #1 – Use remote provision for site template and to push configurations to sites #2 – Avoid custom master pages, if possible #3 – Avoid feature framework and sandbox solutions #4 – Use “remote timer job” pattern for scheduled and batch operations #5 – Take advantage of the add-in model in both on-premises and in Office 365

#1 – Remote provisioning Provision site collections and sub sites remotely to provide different templates Provider hosted, PowerShell, Console applications All artifacts and customizations are pushed to the sites using remote APIs

#1 - Provisioning time logic Assets and config. Branding Images JavaScript files Page Layouts Other settings Project site Organizational Workgroup Initial provisioning based on the out of the box site. Usually either team site or publishing site. Assets are uploaded from the provisioning engine using CSOM/REST Apply the needed changes (configurations etc.) on top of the out of the box site based on the user selection. This is the specialization part, but since we start from oob site, we always get the latest improvements to it as a base line. 2 3 Remote timer job 1

PnP Provisioning Engine Framework for easily doing Remote Provisioning Part of the OfficeDev PnP Core component Object oriented engine for easy and fast Remote Provisioning Capabilities Automated Remote Provisioning Easy Site Template Generation/Extraction Available in Microsoft .NET There are PowerShell extensions for common tasks Export/Import of templates in a formatter-independent manner XML Schema JSON Whatever else…

Site provisioning framework C# // Get template from existing site template = ctx.Web.GetProvisioningTemplate(); XMLFileSystemTemplateProvider XMLAzureStorageTemplateProvider XMLSharePointTemplateProvider 1 2 4 Site A Site B Connectors 3 // Save template using XML provider XMLFileSystemTemplateProvider provider = new XMLFileSystemTemplateProvider(@"c:\temp\", ""); string templateName = "template.xml"; provider.SaveAs(template, templateName); // Load the saved model again ProvisioningTemplate p2 = provider.GetTemplate(templateName); // Apply template to existing site ctxTarget.Web.ApplyProvisioningTemplate(template);

#2 - Branding Unlimited Good Average Fair Options Support Flexibility Custom Master Page Full control on how the site is rendered Applied to each site, except for publishing sites Any updates to oob master pages are not automatically reflected on the sites Possible challenges with service updates Alternate CSS Can be used to override whatever CSS settings Control to color, fonts and even layout settings Configuration applied to each site Theme Can be used to control branding, fonts and background image of the sites Configuration applied to each site 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 Options only Support Unlimited Good Average Fair Flexibility

#3 – Avoid sandbox solutions Code behind sandbox solutions are deprecated No centralized control for sandbox solutions No enterprise level capabilities for controlling available solutions Possible orphan issues with deactivation Still based on feature framework with it’s caveats “We deployed custom default.aspx and now things are broken” Update operations will require code anyway

#4 - Remote timer job 2 1 SharePoint Service Provider Hosted Apps Scheduled execution which accesses the needed resources from the SharePoint service and performs the required automation. Can use either specific account for connection or oAuth based app-only token approach 2 Provider Hosted Apps 1 Remote timer job

#4 - Asynchronous pattern with WebJobs 2 Provider Hosted Apps SharePoint <<Add message>> <<Run app functionality>> 1 Storage Queue 3 << Perform needed actions>> <<instantiate>> WebJob 4

#5 – Add-in model for on-premises Write once, use it in both worlds Add-Ins recommended model for on-premises as well Add-in development can be similar as with Office 365 with one time configuration for local farm No additional headaches with certificates and developers do not need to understand insights of token model Provider hosted as the preferred model Requires 2 new servers like Office Web Apps since SP2013 release

Agenda 1 2 3 4 Best Practices for Add-In Model Best Practices – SPO Development 3 Business User Driven Template 4 CSOM Based Customization Strategy Checkpoints

Best Practices - SPO Development

Remote timer job 2 1 SharePoint Service Provider Hosted Apps Scheduled execution which accesses the needed resources from the SharePoint service and performs the required automation. Can use either specific account for connection or oAuth based app-only token approach 2 Provider Hosted Apps 1 Remote Timer job

Page Modification CSOM / REST 1 2 SharePoint Service Execution of the needed modifications based on needed event. Can be done based on app installed, part of provisioning or based on end user request 1 SharePoint Service Provider Hosted Apps CSOM / REST 2

JS Injection CSOM / REST 1 2 3 js SharePoint Service Association of JavaScript Injection (user custom action) to the site, so that code is executed during site processing SharePoint Service 1 Provider Hosted Apps CSOM / REST 2 js <<Reference>> 3 UX component or elements are rendered using CSOM with JavaScript stored either in SharePoint or centrally in the provider hosted app side.

JS injection for messages SharePoint Service Association of JavaScript Injection (user custom action) to the site, so that code is executed during site processing 1 Provider Hosted Apps CSOM / REST 2 js <<Reference>> 3 UX elements are rendered with JavaScript by using with script stored either in SharePoint, centrally in the provider hosted app side or in some CDN. Preferable in one location for easy update cross all instances.

App Script Part 1 2 3 4 App Script Part SharePoint js SharePoint Service SharePoint 1 Provider Hosted Apps App Script Part <div id=“”/> 2 js <<Reference>> 3 4 Out of the box script or content editor web part with the needed reference to JavaScript in the provider hosted app side UX component or elements are rendered using CSOM with JavaScript stored either in SharePoint or centrally in the provider hosted app side (preferred).

App Popup 1 2 3 4 App Popup SharePoint SharePoint Service aspx Provider Hosted Apps aspx 2 <<Load Page>> 3 4 Usage of out of the box pop up technique to show modal popup for the end user. Can be started from link in a page or for example from custom action. Provider hosted application is presented in the popup and it can perform needed operations based on the requirements.

Client side rendering CSOM / REST 1 2 3 js SharePoint Service Association of client side rendering Injection to field, view or web part, so that client side library is included to the rendering process when content is viewed. Provider Hosted Apps CSOM / REST 2 js <<Reference>> 3 UX component or elements are rendered using CSOM with JavaScript stored either in SharePoint site or referenced from provider hosted app side. JavaScript will override the detault read or edit experience of the functionality.

Centralized Asset Deployment https://xxx.sharepoint.com/sites/site3 https://xxx.sharepoint.com https://xxx.sharepoint.com/sites/site https://xxx.sharepoint.com /sites/site2 <<Reference>> Provider Hosted Apps

Customer User profile sync and usage process 5 1 2 3 4 Functionalities can use the user profile properties to show information or to change the end user experience. 5 Active Directory Custom synch tool SharePoint Service Azure Active Directory Customer 1 2 Custom synchronization tool for extended attributes what needs to be sync'd to SharePoint User profile hosted in Azure, on-premises or in both depending on needed actions 3 LOB System On-premises LOB system for possible extended attributes 4 Standardized set of attributes which are replicated to the SharePoint user profile store.

Provisioning Apps Azure Web Sites SharePoint Online SQL Azure CSS png aspx master js Azure Data Market SharePoint Online Host Web App Web

Controlling master page and page layouts from app 1 Provider Hosted Apps SharePoint Service 3 CSOM/REST Upload master page Upload page layouts Set site master page using CSOM Set page layouts Set allowed site templates Branding assets 2

Handling themes from SP Apps 1 Provider Hosted Apps SharePoint Service 3 CSOM Upload needed files Set theme to site (Set master page to site) Theme elements 2 Color file Font file Background image (Master page) App is started from the web by end user or process is started during provisioning App side has the needed theme elements and other assets for sites, which will be published App drives the modification of the host web by applying the needed customizations to host web

Controlling CSS from App 1 Provider Hosted Apps SharePoint Service 3 CSOM/REST Upload CSS Set alternate CSS for the site Assets 2 CSS file Images

List templates from apps 1 Provider Hosted Apps SharePoint Service 3 CSOM/REST Creation of oob list Add lists Add content types and site columns Add other configurations Configuration 2

Async pattern for site collection provisioning SharePoint Service 2 Provider Hosted Apps <<Add message>> <<Run app functionality>> Storage Queue 1 3 https://xxx.sharepoint.com/sites/site <<instantiate>> WebJob 5 << Create site collection>> 4 Branding Images Master Pages Page Layouts Other settings Assets and config.

Agenda 1 2 3 4 Best Practices for Add-In Model Best Practices – SPO Development 3 Business User Driven Template 4 CSOM Based Customization Strategy Checkpoints

Business user driven templates 2 1 Modify with browser 3 Provider Hosted App Extract template Provisioning engine Template sites 4 5 SharePoint Service Template details are being extracted from actual template sites during provisioning. Templates can be modified and crated using browser UI and all changes are reflected to the newly created and potentially modified sites. https://xxx.sharepoint.com/sites/site

Agenda 1 2 3 4 Best Practices for Add-In Model Best Practices – SPO Development 3 Business User Driven Template 4 CSOM Based Customization Strategy Checkpoints

Checkpoint Description SharePoint CSOM based Customization Strategy Checkpoints # Done Checkpoint Description Remarks, if any 1  CSOM requires to use SQL-like programming pattern.   2  Declare what data is required and then build either an ad hoc SQL query or a stored procedure , execute the query before accessing the data 3  Identify value object returned from a method or property is not used until the query is executed. 4  Keep track of the Object Path that the client object is created as this object can be used as a parameter to invoke other methods within the same query. 5  Identify conditional scope to test for preconditions before loading data. 6  Call Load and ExecuteQuery Before Accessing Value Properties 7  Provide Group Data Retrieval on the Same SharePoint Client Object 8  Identify properties of objects you want to return as Retrieving a SharePoint Client Object Does Not Retrieve All Properties 9  Provide exception handling scope to catch exceptions.