36
SharePoint Add-Ins Essential Knowledge By Joshua Petryk Room 7 – 10:00 am Central

Essential Knowledge for SharePoint Add-Ins

Embed Size (px)

Citation preview

Page 1: Essential Knowledge for SharePoint Add-Ins

SharePoint Add-Ins

Essential Knowledge

By Joshua Petryk

Room 7 – 10:00 am Central

Page 2: Essential Knowledge for SharePoint Add-Ins

Intros Joshua Petryk Senior Consultant with Trophy Consulting

Developer, Architect, Cloud Champion!

Page 3: Essential Knowledge for SharePoint Add-Ins
Page 4: Essential Knowledge for SharePoint Add-Ins

Understanding Add-Ins

Page 5: Essential Knowledge for SharePoint 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

Page 6: Essential Knowledge for SharePoint Add-Ins

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/

Page 7: Essential Knowledge for SharePoint Add-Ins

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.

Page 8: Essential Knowledge for SharePoint Add-Ins

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!

Page 9: Essential Knowledge for SharePoint Add-Ins

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

Page 10: Essential Knowledge for SharePoint Add-Ins

ExampleWeb Part Add-InEdit list items to form the tiles.

Get a live preview at the bottom!

Add the web part to your site.

Page 11: Essential Knowledge for SharePoint Add-Ins

Installing Add-Ins

Page 12: Essential Knowledge for SharePoint Add-Ins

Two Ways to AcquireUpload package to Add-In catalog.

Download from SharePoint Store.Site Contents

Page 13: Essential Knowledge for SharePoint Add-Ins

Store ExampleSee a Preview

See Description, Version, Reviews, Release Date etc.

Try It

Buy It

Select Number of Licenses

Page 14: Essential Knowledge for SharePoint Add-Ins

Add-In CatalogMay read as “App Catalog”

Page 15: Essential Knowledge for SharePoint Add-Ins

Uploading Add-InsUpload .app package to “Apps for SharePoint” library.

Edit Properties to set Icon, Description, Enable or Disable.

Page 16: Essential Knowledge for SharePoint Add-Ins

Developing Add-Ins

Page 17: Essential Knowledge for SharePoint 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

Page 18: Essential Knowledge for SharePoint Add-Ins

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

Page 19: Essential Knowledge for SharePoint Add-Ins

VS TemplatesGet started with Visual Studio

Page 20: Essential Knowledge for SharePoint Add-Ins

SharePoint – HostedTemplateNote Elements.xml, AppManifest.xml

Page 21: Essential Knowledge for SharePoint Add-Ins

Provider – Hosted TemplateNeed a Certificate On-Prem

Note AppManifest.xml

Note Web Project

Page 22: Essential Knowledge for SharePoint Add-Ins

App ManifestThe XML files that defines an Add-In

Page 23: Essential Knowledge for SharePoint Add-Ins

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

Page 24: Essential Knowledge for SharePoint Add-Ins

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

Page 25: Essential Knowledge for SharePoint Add-Ins

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.

Page 26: Essential Knowledge for SharePoint Add-Ins

Add-In Security

Page 27: Essential Knowledge for SharePoint Add-Ins

Add-In Identity Add-Ins have an identity separate from users

Manage permissions in Site Settings

Page 28: Essential Knowledge for SharePoint Add-Ins

Permission LevelsList

Website

Site Collection

Tenant

Read

Write

Manage

Full Control

Page 29: Essential Knowledge for SharePoint Add-Ins

App-Only PermissionProvider hosted only!

Similar to Elevated Permissions

Bypass User Permission Check

Good for un-attended tasks (Timer Job)

Page 30: Essential Knowledge for SharePoint Add-Ins

Acquiring Add-Ins Two Ways

◦ Upload package to Add-In catalog.◦ Download from SharePoint Store.

Page 31: Essential Knowledge for SharePoint Add-Ins

Recap

Page 32: Essential Knowledge for SharePoint Add-Ins

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!

Page 33: Essential Knowledge for SharePoint Add-Ins

Sneak Peak!Office Excel Visualization inside of a SharePoint Add-In?

Page 34: Essential Knowledge for SharePoint Add-Ins

Tweet Us For a Chance To Win 2 Rangers Tickets@trophysoftware

Page 35: Essential Knowledge for SharePoint Add-Ins

Questions & Answers

Page 36: Essential Knowledge for SharePoint Add-Ins

www.trophyconsulting.com Visit Us at Booth 203