SlideShare una empresa de Scribd logo
1 de 36
Descargar para leer sin conexión
Modern SharePoint Development
- techniques for moving code off
SharePoint servers
Chris O’Brien – MVP
www.sharepointnutsandbolts.com
About me
 Independent Consultant
 Head of Development, Content and Code
 Blog: www.sharepointnutsandbolts.com
 Twitter: @ChrisO_Brien
 LinkedIn: http://uk.linkedin.com/in/
chrisobrienmvp
Agenda
 Background – remote code for the win
 Core techniques/references:
 Remote Event Receivers (e.g. in Azure)
 PowerShell and CSOM – a winning combo
 AMS samples
 The “optimum position” debate
 Summary
SharePoint as a dev platform
 8 years of farm solutions
– we were hooked!
 The horror:
 Objects not disposed
 Dodgy web parts
 API bad practices
 Timer job proliferation
 ..and more
SharePoint – the bad parts
 Too easy for custom
code to bring
SharePoint down
 Result – SharePoint
got a bad rep
 No good for Office
365!
What is cloud-friendly dev?
No - farm solutions/files deployed to _LAYOUTS
• No feature receivers
• No timer jobs
• No event receivers
Yes - sandbox solutions, but no code in sandbox solutions
Yes - apps (aka remote code)
* Deployable in Office 365 *
• No custom field controls
• No site definitions
• No custom web parts (due to use of code)
Benefits even to on-premises projects?
• One app can no longer bring SharePoint down
Better isolation
• Fewer SharePoint artifacts to audit/upgrade
Simpler upgrade (e.g. to “SharePoint 2015”)
• Less rework to transition
Keeps door open to Office 365
Code implementation mapping
Farm solution Remote code/apps
Timer job Scheduled process in Azure (CSOM to
read/write to SP)
Event receiver Remote event receiver
Custom field control JSLink
Site definition WebTemplate in NCSS *
Run With Elevated Privileges App-only authentication
Custom web parts/user control App part, or JavaScript + DOM
Feature receiver, DelegateControl,
application page
None – but other approaches possible
* NCSS = no-code sandbox solution
Problem areas (examples)
• Custom authentication
• Custom claims provider (needed for People
Picker in SAML claims)
• Admin UI customisations
Not possible
• Branding of OneDrive sites (personal sites)
• Remote provisioning (of site collections)
Possible, but
involved:
NOTE! The AMS samples cover these scenarios
The remote code model
Remote code – what you need to know
 Various flavours:
 “Off-box” server-side code (CSOM)
 Powershell/CSOM scripts (CSOM)
 JavaScript code (JSOM/REST)
 An app is needed for server code (trust)
 Required to use app authentication (OAuth or S2S)
 Alternative – user authentication with password and
SharePointOnlineCredential (e.g. PS/CSOM script)
Examples of remote server-side code
(CSOM)
 Pages in an app (e.g. ASP.NET – in Azure or IIS)
 User goes OUT of SharePoint and into remote app
 App pages in an app part (IFrame) in SharePoint page
 User stays in SharePoint, IFrame brings remote page in
 Tip! This is a key “hook” to execute remote code 
 Services
 Remote Event Receivers
 App events | List/list item events | WebProvisioned event | etc.
Remote provisioning code – considerations
 JavaScript-based approaches can be interesting:
 Custom control added to site home page
 When first user (or admin) hits site, shows a “Getting your site
ready” message
 JSOM code runs to provision fields/content types/pages etc.
 Sets flag(s) on web property bag when done – next run checks
 From the server-side (CSOM) approaches:
 The WebProvisioned event (RER) can be a useful hook!
Remote code (CSOM) – where?
 Options include:
 Azure Websites (VM role not needed)
 Some IIS servers (usually inside your network)
 Pros/cons
Pros – Azure Websites Cons - Azure Websites
+ Easy. Even a dev can do it! - Typically need to implement authentication
(since accessible on internet)
+ Microsoft take care of SSL,
external access, load-balancing,
high availability etc.
- Need to implement Azure if not done
already (e.g. who pays the bill?)
Remote Event Receivers
 Key pillar of “remote code” model
 Effectively a WCF service somewhere callable
 List/list item receivers
 WebProvisioned receiver
 App events:
 AppInstalled, AppUpgraded, AppUninstalled (also –ing)
 *No* equivalent for Feature Receivers
Remote Event Receivers – key steps
1. Create provider-hosted app (and add RER code)
2. Create Azure Website (if doesn’t exist)
3. Publish remote code to Azure
4. Register app with AppRegNew.aspx (or Seller Dashboard)
5. Publish app package, put in app catalog
6. Add to site
7. Associate RERs with lists (e.g. with PowerShell/CSOM)
8. Test!
DEMO:
Remote code in Azure
(Remote Event Receivers)
Click “next slide” to see this demo
on YouTube, or use link:
https://www.youtube.com/watch?v=G
4T1eLg0_to
PowerShell and CSOM
PowerShell in Office 365
0
100
200
300
400
500
600
700
800
900
Poweshell cmdlets
PS cmdlets
On-premises SharePoint Online
On-premises SharePoint Online
774 30
PowerShell + CSOM – don’t confuse with:
 The MSOL/Azure AD cmdlets
 Generic Office 365 PowerShell – add
users, groups etc.
 The SPO cmdlets
 SharePoint Online PowerShell –
create site collections etc.
Instead, use STANDARD PowerShell
command prompt for PS + CSOM
PowerShell + CSOM – how it works
 Using PS ability to call any .NET object
 Need to have CSOM DLLs available
 Run script from a SharePoint environment
OR
 Install “client redistributable” (or manually copy DLLs)
PowerShell + CSOM – what it looks like
Add-Type -Path "c:LibMicrosoft.SharePoint.Client.dll"
Add-Type -Path "c:LibMicrosoft.SharePoint.Client.Runtime.dll"
Add-Type -Path "c:LibMicrosoft.SharePoint.Client.Taxonomy.dll"
# connect/authenticate to SharePoint Online and get ClientContext object..
$clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url)
$credentials = New-Object
Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword)
$clientContext.Credentials = $credentials
# do something..
$rootWeb = $clientContext.Web
$clientContext.Load($rootWeb)
$clientContext.ExecuteQuery()
$rootWeb.Title = "Updated from PS/CSOM script"
$clientContext.ExecuteQuery()
DEMO:
PowerShell + CSOM scripts
Click “next slide” to see this demo
on YouTube, or use link:
http://youtu.be/yuD21t-C9kQ
POWERSHELL + CSOM
PowerShell + CSOM – advanced operations
Importing/exporting taxonomy terms
Importing/exporting search schema
Recreating site collections
Sandbox solution deployment – no API for this!
Activating web templates
Create publishing pages
Uploading files
Microsoft's App Model Samples
AMS – why you should care
 “Office App Model Samples” –
http://officeamscodeplex.com
 Version 2 released May 2014
 Core CSOM helper libraries,
small/large samples etc.
Because it’s AWESOME – it’s the “helper library” you
dreamed about, plus samples you’d use!
AMS – what’s in there (AKA the “eye test”
slide )
Branding
• DeployThemeToWeb
• SetThemeToWeb
• SetSiteLogo
Features
• ActivateFeature
• DeactivateFeature
Fields and content types
• AddContentTypeToList
• AddFieldToContentType
• CreateContentType
• CreateField
• CreateTaxonomyField
(including wire-up)
Files and folders
• UploadDocumentToLibrary
• UploadDocumentToFolder
• CreateFolder
Pages
• AddWebPartToWebPartPag
e
• AddWebPartToWikiPage
• DeleteWebPart
• AddHtmlToWikiPage
Sites
• AddSite
• AddSiteCollectionTenant
• MySiteSearch (CSOM
search)
• ProcessQuery (CSOM
search)
• SetPropertyBagValue
Security
• AddAdministrators
• GetAdministrators
• GetSharingCapabilitiesTena
nt
Navigation
• AddCustomAction
• AddNavigationNode
• DeleteAllQuickLaunchNodes
List
• AddList
• AddDocumentLibrary
• GetList
• UpdateListVersioning
See – I *told* you it was AWESOME!
AMS – what’s (really) in there
Branding
Create fields
and content
types
Create
lists/libraries
Create
sites/site
collections
Upload files
Configure
navigation
App code (CSOM) to support lots of “collab” scenarios:
AMS – COB’s 5 favourite scenarios
1. Modifying OneDrive sites (e.g. branding)
2. Remote “timer job”
3. Custom site collection creation (“templating”)
4. Adding Remote Event Receivers to host web
5. Cross site collection navigation (term set-driven)
6. Bulk update user profiles
AMS – COB’s 5 favourite core methods
1. CreateTaxonomyField (including wire-up)
2. CreateField/CreateContentType
3. AddList/AddDocumentLibrary
4. UploadDocumentToLibrary
5. AddCustomAction
Other useful AMS artifacts
 Controls for use in provider-hosted apps:
 “People picker”  “Taxonomy picker”
DEMO:
AMS samples
Click “next slide” to see this demo
on YouTube, or use link:
http://youtu.be/GISWaLZ3r_4
The optimum position (for Microsoft?)
 You use all the techniques we’ve discussed, so that..
 ..all your customizations could be deployed to Office 365
 But also:
MSFT optimum Reason But consider!
NO custom master
page
MSFT want to push updates
to master pages
Your customisations could
break (e.g. DOM change)
NO XML for
provisioning, remote
code used instead
Fields/ctypes in XML causes
them upgrade problems
Unclear if any benefit to
implementor
Summary
 Many clients (not just Office 365 orgs) will want “modern”
cloud-friendly development
 Some key
elements:
 The “optimum position” debate is worth following
Apps
No-Code
Sandbox
Solutions
PS/CSOM
scripts
Remote
Event
Receivers
Azure
AMS
samples
Thank you for attending!
www.sharepointnutsandbolts.com
@ChrisO_Brien

Más contenido relacionado

La actualidad más candente

O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...NCCOMMS
 
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01Sonja Madsen
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentChris O'Brien
 
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien
 
Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013SharePointRadi
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentChris O'Brien
 
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...NCCOMMS
 
Chris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutionsChris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutionsChris O'Brien
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersRob Windsor
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per officeFabio Franzini
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersNCCOMMS
 
Office 2013 loves web developers slide
Office 2013 loves web developers   slideOffice 2013 loves web developers   slide
Office 2013 loves web developers slideFabio Franzini
 
COB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportCOB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportChris O'Brien
 
Developing Apps for SharePoint Store
Developing Apps for SharePoint StoreDeveloping Apps for SharePoint Store
Developing Apps for SharePoint StoreKashif Imran
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassEuropean Collaboration Summit
 
[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI ScenariosEuropean Collaboration Summit
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Fabio Franzini
 
Building SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJSBuilding SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJSSharePointInstitute
 

La actualidad más candente (20)

ECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sitesECS19 Bert Jansen - Modernizing your existing sites
ECS19 Bert Jansen - Modernizing your existing sites
 
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
O365Con18 - Site Templates, Site Life Cycle Management and Modern SharePoint ...
 
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01SharePoint Framework, React and Office UI SPS Paris 2016 - d01
SharePoint Framework, React and Office UI SPS Paris 2016 - d01
 
Application Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 developmentApplication Lifecycle Management for Office 365 development
Application Lifecycle Management for Office 365 development
 
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developersChris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien - Introduction to the SharePoint Framework for developers
 
[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions[Struyf] Automate Your Tasks With Azure Functions
[Struyf] Automate Your Tasks With Azure Functions
 
Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013Practical management of development & QA environments for SharePoint 2013
Practical management of development & QA environments for SharePoint 2013
 
Do's and don'ts for Office 365 development
Do's and don'ts for Office 365 developmentDo's and don'ts for Office 365 development
Do's and don'ts for Office 365 development
 
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...
O365Con18 - PowerApps build custom forms for SharePoint with Azure Maps - Bra...
 
Chris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutionsChris O'Brien - Building AI into Power Platform solutions
Chris O'Brien - Building AI into Power Platform solutions
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint Developers
 
Sviluppare app per office
Sviluppare app per officeSviluppare app per office
Sviluppare app per office
 
SPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event HandlersSPUnite17 Timer Jobs Event Handlers
SPUnite17 Timer Jobs Event Handlers
 
Office 2013 loves web developers slide
Office 2013 loves web developers   slideOffice 2013 loves web developers   slide
Office 2013 loves web developers slide
 
COB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline supportCOB ESPC18 - Rich PowerApps with offline support
COB ESPC18 - Rich PowerApps with offline support
 
Developing Apps for SharePoint Store
Developing Apps for SharePoint StoreDeveloping Apps for SharePoint Store
Developing Apps for SharePoint Store
 
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClassECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
ECS19 - Vesa Juvonen - SharePoint and Office 365 Development PowerClass
 
[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios[Vončina] Configuring SharePoint 2016 for BI Scenarios
[Vončina] Configuring SharePoint 2016 for BI Scenarios
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...Come riprogettare le attuali farm solution di share point con il nuovo modell...
Come riprogettare le attuali farm solution di share point con il nuovo modell...
 
Building SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJSBuilding SharePoint Single Page Applications Using AngularJS
Building SharePoint Single Page Applications Using AngularJS
 

Similar a Chris O'Brien - Modern SharePoint development: techniques for moving code off SharePoint servers

Spca2014 chris o brien modern share-point development - techniques for off-...
Spca2014 chris o brien   modern share-point development - techniques for off-...Spca2014 chris o brien   modern share-point development - techniques for off-...
Spca2014 chris o brien modern share-point development - techniques for off-...NCCOMMS
 
Spsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuSpsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuamitvasu
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMamitvasu
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Amazon Web Services
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Amazon Web Services
 
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Amazon Web Services
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...BlueMetalInc
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Bram de Jager
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012NCCOMMS
 
Integrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfIntegrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfAmazon Web Services
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to AppsGilles Pommier
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesBrian Culver
 
Integrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdfIntegrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdfAmazon Web Services
 
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...XBOSoft
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenNCCOMMS
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesAmazon Web Services
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)AWS Vietnam Community
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Kashif Imran
 

Similar a Chris O'Brien - Modern SharePoint development: techniques for moving code off SharePoint servers (20)

Spca2014 chris o brien modern share-point development - techniques for off-...
Spca2014 chris o brien   modern share-point development - techniques for off-...Spca2014 chris o brien   modern share-point development - techniques for off-...
Spca2014 chris o brien modern share-point development - techniques for off-...
 
Spsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasuSpsct15 power shell_csom - amit vasu
Spsct15 power shell_csom - amit vasu
 
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOMSPSToronto 2015 - Managing Office365 with PowerShell and CSOM
SPSToronto 2015 - Managing Office365 with PowerShell and CSOM
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
 
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...Local Testing and Deployment Best Practices for Serverless Applications - AWS...
Local Testing and Deployment Best Practices for Serverless Applications - AWS...
 
Introducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFxIntroducción al SharePoint Framework SPFx
Introducción al SharePoint Framework SPFx
 
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...Supercharge Your Product Development with Continuous Delivery & Serverless Co...
Supercharge Your Product Development with Continuous Delivery & Serverless Co...
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
Developing SharePoint 2013 apps with Visual Studio 2012 - SharePoint Connecti...
 
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
SPCA2013 - Developing SharePoint 2013 Apps with Visual Studio 2012
 
Integrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdfIntegrating_Cloud_Development_Security_And_Operations.pdf
Integrating_Cloud_Development_Security_And_Operations.pdf
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps2014 SharePoint Saturday Melbourne Apps or not to Apps
2014 SharePoint Saturday Melbourne Apps or not to Apps
 
Real World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure ServicesReal World SharePoint Framework and Azure Services
Real World SharePoint Framework and Azure Services
 
Integrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdfIntegrating-Cloud-Development-Security-And-Operations.pdf
Integrating-Cloud-Development-Security-And-Operations.pdf
 
Intro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUGIntro to ColdBox MVC at Japan CFUG
Intro to ColdBox MVC at Japan CFUG
 
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...
7 Things Testers Should Know About The Cloud with Bill Wilder & XBOSoft March...
 
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas VochtenO365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
O365Con18 - Hybrid SharePoint Deep Dive - Thomas Vochten
 
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar SeriesDeep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
Deep Dive on Serverless Web Applications - AWS May 2016 Webinar Series
 
Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)Build an app on aws for your first 10 million users (2)
Build an app on aws for your first 10 million users (2)
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
 

Más de Chris O'Brien

Chris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing workChris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing workChris O'Brien
 
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmapsChris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmapsChris O'Brien
 
COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018Chris O'Brien
 
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)Chris O'Brien
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienChris O'Brien
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienCustomizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienChris O'Brien
 
SP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienSP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienChris O'Brien
 
Getting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'BrienGetting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'BrienChris O'Brien
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveChris O'Brien
 
Automated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 DevelopmentAutomated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 DevelopmentChris O'Brien
 
Optimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet SitesOptimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet SitesChris O'Brien
 
Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2Chris O'Brien
 
Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1Chris O'Brien
 
SharePoint workflow deep-dive
SharePoint workflow deep-dive SharePoint workflow deep-dive
SharePoint workflow deep-dive Chris O'Brien
 
SharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tipsSharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tipsChris O'Brien
 

Más de Chris O'Brien (15)

Chris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing workChris OBrien - Azure DevOps for managing work
Chris OBrien - Azure DevOps for managing work
 
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmapsChris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
 
COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018COB - PowerApps - the good, the bad and the ugly - early 2018
COB - PowerApps - the good, the bad and the ugly - early 2018
 
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
 
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrienDeep dive into SharePoint 2013 hosted apps - Chris OBrien
Deep dive into SharePoint 2013 hosted apps - Chris OBrien
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrienCustomizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
 
SP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'BrienSP2013 for Developers - Chris O'Brien
SP2013 for Developers - Chris O'Brien
 
Getting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'BrienGetting to grips with SharePoint 2013 apps - Chris O'Brien
Getting to grips with SharePoint 2013 apps - Chris O'Brien
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
 
Automated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 DevelopmentAutomated Builds And UI Testing in SharePoint 2010 Development
Automated Builds And UI Testing in SharePoint 2010 Development
 
Optimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet SitesOptimizing SharePoint 2010 Internet Sites
Optimizing SharePoint 2010 Internet Sites
 
Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2Managing the SharePoint 2010 Application Lifecycle - Part 2
Managing the SharePoint 2010 Application Lifecycle - Part 2
 
Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1Managing the SharePoint 2010 Application Lifecycle - Part 1
Managing the SharePoint 2010 Application Lifecycle - Part 1
 
SharePoint workflow deep-dive
SharePoint workflow deep-dive SharePoint workflow deep-dive
SharePoint workflow deep-dive
 
SharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tipsSharePoint Web Content Management - Lessons Learnt/top 5 tips
SharePoint Web Content Management - Lessons Learnt/top 5 tips
 

Último

COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxUdaiappa Ramachandran
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 

Último (20)

COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
Building AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptxBuilding AI-Driven Apps Using Semantic Kernel.pptx
Building AI-Driven Apps Using Semantic Kernel.pptx
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 

Chris O'Brien - Modern SharePoint development: techniques for moving code off SharePoint servers

  • 1. Modern SharePoint Development - techniques for moving code off SharePoint servers Chris O’Brien – MVP www.sharepointnutsandbolts.com
  • 2. About me  Independent Consultant  Head of Development, Content and Code  Blog: www.sharepointnutsandbolts.com  Twitter: @ChrisO_Brien  LinkedIn: http://uk.linkedin.com/in/ chrisobrienmvp
  • 3. Agenda  Background – remote code for the win  Core techniques/references:  Remote Event Receivers (e.g. in Azure)  PowerShell and CSOM – a winning combo  AMS samples  The “optimum position” debate  Summary
  • 4. SharePoint as a dev platform  8 years of farm solutions – we were hooked!  The horror:  Objects not disposed  Dodgy web parts  API bad practices  Timer job proliferation  ..and more
  • 5. SharePoint – the bad parts  Too easy for custom code to bring SharePoint down  Result – SharePoint got a bad rep  No good for Office 365!
  • 6. What is cloud-friendly dev? No - farm solutions/files deployed to _LAYOUTS • No feature receivers • No timer jobs • No event receivers Yes - sandbox solutions, but no code in sandbox solutions Yes - apps (aka remote code) * Deployable in Office 365 * • No custom field controls • No site definitions • No custom web parts (due to use of code)
  • 7. Benefits even to on-premises projects? • One app can no longer bring SharePoint down Better isolation • Fewer SharePoint artifacts to audit/upgrade Simpler upgrade (e.g. to “SharePoint 2015”) • Less rework to transition Keeps door open to Office 365
  • 8. Code implementation mapping Farm solution Remote code/apps Timer job Scheduled process in Azure (CSOM to read/write to SP) Event receiver Remote event receiver Custom field control JSLink Site definition WebTemplate in NCSS * Run With Elevated Privileges App-only authentication Custom web parts/user control App part, or JavaScript + DOM Feature receiver, DelegateControl, application page None – but other approaches possible * NCSS = no-code sandbox solution
  • 9. Problem areas (examples) • Custom authentication • Custom claims provider (needed for People Picker in SAML claims) • Admin UI customisations Not possible • Branding of OneDrive sites (personal sites) • Remote provisioning (of site collections) Possible, but involved: NOTE! The AMS samples cover these scenarios
  • 11. Remote code – what you need to know  Various flavours:  “Off-box” server-side code (CSOM)  Powershell/CSOM scripts (CSOM)  JavaScript code (JSOM/REST)  An app is needed for server code (trust)  Required to use app authentication (OAuth or S2S)  Alternative – user authentication with password and SharePointOnlineCredential (e.g. PS/CSOM script)
  • 12. Examples of remote server-side code (CSOM)  Pages in an app (e.g. ASP.NET – in Azure or IIS)  User goes OUT of SharePoint and into remote app  App pages in an app part (IFrame) in SharePoint page  User stays in SharePoint, IFrame brings remote page in  Tip! This is a key “hook” to execute remote code   Services  Remote Event Receivers  App events | List/list item events | WebProvisioned event | etc.
  • 13. Remote provisioning code – considerations  JavaScript-based approaches can be interesting:  Custom control added to site home page  When first user (or admin) hits site, shows a “Getting your site ready” message  JSOM code runs to provision fields/content types/pages etc.  Sets flag(s) on web property bag when done – next run checks  From the server-side (CSOM) approaches:  The WebProvisioned event (RER) can be a useful hook!
  • 14. Remote code (CSOM) – where?  Options include:  Azure Websites (VM role not needed)  Some IIS servers (usually inside your network)  Pros/cons Pros – Azure Websites Cons - Azure Websites + Easy. Even a dev can do it! - Typically need to implement authentication (since accessible on internet) + Microsoft take care of SSL, external access, load-balancing, high availability etc. - Need to implement Azure if not done already (e.g. who pays the bill?)
  • 15. Remote Event Receivers  Key pillar of “remote code” model  Effectively a WCF service somewhere callable  List/list item receivers  WebProvisioned receiver  App events:  AppInstalled, AppUpgraded, AppUninstalled (also –ing)  *No* equivalent for Feature Receivers
  • 16. Remote Event Receivers – key steps 1. Create provider-hosted app (and add RER code) 2. Create Azure Website (if doesn’t exist) 3. Publish remote code to Azure 4. Register app with AppRegNew.aspx (or Seller Dashboard) 5. Publish app package, put in app catalog 6. Add to site 7. Associate RERs with lists (e.g. with PowerShell/CSOM) 8. Test!
  • 17. DEMO: Remote code in Azure (Remote Event Receivers) Click “next slide” to see this demo on YouTube, or use link: https://www.youtube.com/watch?v=G 4T1eLg0_to
  • 19. PowerShell in Office 365 0 100 200 300 400 500 600 700 800 900 Poweshell cmdlets PS cmdlets On-premises SharePoint Online On-premises SharePoint Online 774 30
  • 20. PowerShell + CSOM – don’t confuse with:  The MSOL/Azure AD cmdlets  Generic Office 365 PowerShell – add users, groups etc.  The SPO cmdlets  SharePoint Online PowerShell – create site collections etc. Instead, use STANDARD PowerShell command prompt for PS + CSOM
  • 21. PowerShell + CSOM – how it works  Using PS ability to call any .NET object  Need to have CSOM DLLs available  Run script from a SharePoint environment OR  Install “client redistributable” (or manually copy DLLs)
  • 22. PowerShell + CSOM – what it looks like Add-Type -Path "c:LibMicrosoft.SharePoint.Client.dll" Add-Type -Path "c:LibMicrosoft.SharePoint.Client.Runtime.dll" Add-Type -Path "c:LibMicrosoft.SharePoint.Client.Taxonomy.dll" # connect/authenticate to SharePoint Online and get ClientContext object.. $clientContext = New-Object Microsoft.SharePoint.Client.ClientContext($url) $credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePassword) $clientContext.Credentials = $credentials # do something.. $rootWeb = $clientContext.Web $clientContext.Load($rootWeb) $clientContext.ExecuteQuery() $rootWeb.Title = "Updated from PS/CSOM script" $clientContext.ExecuteQuery()
  • 23. DEMO: PowerShell + CSOM scripts Click “next slide” to see this demo on YouTube, or use link: http://youtu.be/yuD21t-C9kQ
  • 25. PowerShell + CSOM – advanced operations Importing/exporting taxonomy terms Importing/exporting search schema Recreating site collections Sandbox solution deployment – no API for this! Activating web templates Create publishing pages Uploading files
  • 27. AMS – why you should care  “Office App Model Samples” – http://officeamscodeplex.com  Version 2 released May 2014  Core CSOM helper libraries, small/large samples etc. Because it’s AWESOME – it’s the “helper library” you dreamed about, plus samples you’d use!
  • 28. AMS – what’s in there (AKA the “eye test” slide ) Branding • DeployThemeToWeb • SetThemeToWeb • SetSiteLogo Features • ActivateFeature • DeactivateFeature Fields and content types • AddContentTypeToList • AddFieldToContentType • CreateContentType • CreateField • CreateTaxonomyField (including wire-up) Files and folders • UploadDocumentToLibrary • UploadDocumentToFolder • CreateFolder Pages • AddWebPartToWebPartPag e • AddWebPartToWikiPage • DeleteWebPart • AddHtmlToWikiPage Sites • AddSite • AddSiteCollectionTenant • MySiteSearch (CSOM search) • ProcessQuery (CSOM search) • SetPropertyBagValue Security • AddAdministrators • GetAdministrators • GetSharingCapabilitiesTena nt Navigation • AddCustomAction • AddNavigationNode • DeleteAllQuickLaunchNodes List • AddList • AddDocumentLibrary • GetList • UpdateListVersioning See – I *told* you it was AWESOME!
  • 29. AMS – what’s (really) in there Branding Create fields and content types Create lists/libraries Create sites/site collections Upload files Configure navigation App code (CSOM) to support lots of “collab” scenarios:
  • 30. AMS – COB’s 5 favourite scenarios 1. Modifying OneDrive sites (e.g. branding) 2. Remote “timer job” 3. Custom site collection creation (“templating”) 4. Adding Remote Event Receivers to host web 5. Cross site collection navigation (term set-driven) 6. Bulk update user profiles
  • 31. AMS – COB’s 5 favourite core methods 1. CreateTaxonomyField (including wire-up) 2. CreateField/CreateContentType 3. AddList/AddDocumentLibrary 4. UploadDocumentToLibrary 5. AddCustomAction
  • 32. Other useful AMS artifacts  Controls for use in provider-hosted apps:  “People picker”  “Taxonomy picker”
  • 33. DEMO: AMS samples Click “next slide” to see this demo on YouTube, or use link: http://youtu.be/GISWaLZ3r_4
  • 34. The optimum position (for Microsoft?)  You use all the techniques we’ve discussed, so that..  ..all your customizations could be deployed to Office 365  But also: MSFT optimum Reason But consider! NO custom master page MSFT want to push updates to master pages Your customisations could break (e.g. DOM change) NO XML for provisioning, remote code used instead Fields/ctypes in XML causes them upgrade problems Unclear if any benefit to implementor
  • 35. Summary  Many clients (not just Office 365 orgs) will want “modern” cloud-friendly development  Some key elements:  The “optimum position” debate is worth following Apps No-Code Sandbox Solutions PS/CSOM scripts Remote Event Receivers Azure AMS samples
  • 36. Thank you for attending! www.sharepointnutsandbolts.com @ChrisO_Brien