Upload
innotech
View
282
Download
3
Embed Size (px)
Citation preview
SharePoint Add-Ins
Essential Knowledge
By Joshua Petryk
Room 7 – 10:00 am Central
Intros Joshua Petryk Senior Consultant with Trophy Consulting
Developer, Architect, Cloud Champion!
Understanding Add-Ins
Familiar Concepts SharePoint Concepts
◦ Site hierarchy ◦ Site Collections◦ Webs
◦ Artifacts◦ Web Parts◦ Pages◦ Lists◦ Content Types◦ Et al.
◦ Solutions◦ Packages of SharePoint Artifacts◦ Built by Developers
Web Technology◦ Http / REST◦ Domains◦ iFrames
Defining SharePoint Add-Ins Formerly known as SharePoint Apps.
Only a cosmetic change.
But why?◦ Confusion - everything's an app!◦ Facebook, Uber, LinkedIn, Yelp, Word, PowerPoint, Excel – “real” apps.◦ Appception – an app for an app?◦ Customers familiar with Add-Ins (think COM).
Reference: http://www.jeremythake.com/2015/06/office-365-app-model-rename-cheat-sheet/
What are Add-Ins? Custom code running beside SharePoint.
SharePoint artifacts – lists/pages/workflows etc.
Uses HTTP calls - Client Side Object Model.
Modular packages.
Installed per site or farm.
Explicitly asks for permission.
Why Use Add-Ins?Integrate SharePoint with external systems
Emulate timer jobs Read/Write data from web sources
Modify SharePoint sites Automate branding One-click apply settings Bulk edit navigation
Custom Visual Web Parts Graphical charts Publishing Articles as tiles Custom image gallery with a rotator
Custom forms Automate site creation Interactive list item creation form Submit feedback or issues Copy items between sites
And Much More!
What do they look like? Full Page
◦ Custom webpages◦ May inherit from SharePoint
Web Parts◦ Placed on site pages where installed
Custom Actions◦ Ribbon buttons◦ Item dropdown menu
Image Source: https://msdn.microsoft.com/en-us/library/office/fp179930.aspx
ExampleWeb Part Add-InEdit list items to form the tiles.
Get a live preview at the bottom!
Add the web part to your site.
Installing Add-Ins
Two Ways to AcquireUpload package to Add-In catalog.
Download from SharePoint Store.Site Contents
Store ExampleSee a Preview
See Description, Version, Reviews, Release Date etc.
Try It
Buy It
Select Number of Licenses
Add-In CatalogMay read as “App Catalog”
Uploading Add-InsUpload .app package to “Apps for SharePoint” library.
Edit Properties to set Icon, Description, Enable or Disable.
Developing Add-Ins
Add-Ins vs Traditional Solutions Farm Solution
◦ Installed to the Farm◦ SharePoint Online - NO◦ Required Tools
◦ SharePoint Server instance◦ Visual Studio◦ SDK
◦ Full Trust – No restrictions!◦ Potential Farm Instability
Add-ins◦ Uploaded as a Zip (.app)◦ SharePoint Online - YES◦ Recommended Tools
◦ Visual Studio
◦ Must ask for permissions◦ List only◦ Web only◦ Site Collection only◦ Tenant
Developing / Hosting On-Prem?More complex than Online.
Configure your SP environment: https://technet.microsoft.com/en-us/library/fp161236.aspx
Set up High-Trust certificates: https://msdn.microsoft.com/en-us/library/office/fp179901.aspx
VS TemplatesGet started with Visual Studio
SharePoint – HostedTemplateNote Elements.xml, AppManifest.xml
Provider – Hosted TemplateNeed a Certificate On-Prem
Note AppManifest.xml
Note Web Project
App ManifestThe XML files that defines an Add-In
Add-In Types SharePoint Hosted
◦ Special Add-In Web◦ JavaScript CSOM Only◦ SharePoint Artifacts
◦ Deploy pages, lists, views, content types, workflows.◦ Similar to Solutions (Elements.xml) etc.
Provider Hosted◦ Remote web server – your choice◦ No technology restrictions◦ REST or C# CSOM Only
Host WebRemote Web Server
Database Server
Host Web
Pages ListWorkflow
App Web
Add-In Deployment Scope Tenant Scope
◦ One instance per farm/O365 Tenant◦ Use-case: centralized functions.◦ Installed under Add-in Catalog site collection◦ Global admins only!
◦ “Deploy” to other Site Collections◦ Makes tile appear in Site Contents
◦ Redirects to global “Add-in Web”◦ No Web Parts or UI Controls◦ No “Host Web”
“Site” (Web) Scope◦ One instance per SPWeb
◦ Use-case: web specific functions.◦ Includes Web Parts / UI Controls◦ User must have permissions to install
◦ Appears on Site Contents◦ Directed to unique “Add-in Web”
Reference: https://msdn.microsoft.com/en-us/library/office/fp179896.aspx
Tenant ScopeGo to Site Contents of Add-In Catalog site.
Install App.
Wait for Install.
Click on the menu button.
Click Deployment.
Choose site collections, managed paths, or site templates to deploy to.
Add-In Security
Add-In Identity Add-Ins have an identity separate from users
Manage permissions in Site Settings
Permission LevelsList
Website
Site Collection
Tenant
Read
Write
Manage
Full Control
App-Only PermissionProvider hosted only!
Similar to Elevated Permissions
Bypass User Permission Check
Good for un-attended tasks (Timer Job)
Acquiring Add-Ins Two Ways
◦ Upload package to Add-In catalog.◦ Download from SharePoint Store.
Recap
Key TakeawaysThe only way run code in SharePoint Online.
Any web developer is an Add-In developer.
No farm solution overhead.
Microsoft Stack not required!
Sneak Peak!Office Excel Visualization inside of a SharePoint Add-In?
Tweet Us For a Chance To Win 2 Rangers Tickets@trophysoftware
Questions & Answers
www.trophyconsulting.com Visit Us at Booth 203