5. 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
6. 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/
7. 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.
8. 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!
9. 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
10. Example
Web Part Add-In
Edit list items to form the tiles.
Get a live preview at the bottom!
Add the web part to your site.
17. 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
18. 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
23. 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 Web
Remote Web Server
Database Server
Host Web
Pages ListWorkflow
App Web
24. 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
25. Tenant Scope
Go 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.
32. Key Takeaways
The only way run code in SharePoint Online.
Any web developer is an Add-In developer.
No farm solution overhead.
Microsoft Stack not required!
Show of Hands: Who is familiar/ done custom solutions
Think of them like extensions running on top of sharepoint. You can add custom functionaly for your business. They do not live “inside” sharepoint and they do not have full control over SP. They must explicitly be granted permissions.
Key differences –
Solutions must be built using Visual Studio, you must have a SharePoint Server on the dev machine, must use the SharePoint SDK.
Solutions must be installed to farm using STSADM or Powershell cmdlets
Add-ins are packaged into zips (manifests) – uploaded to Add-in catalog.
Add-Ins don’t require VS but it helps scaffold them from templates.
Main points – SharePoint hosted is for more “traditional” SharePoint customizations where you want list templates, workflows, content types that are easily deployed. You get the full SharePoint UI experience – List Views – Ribbon etc.
Traditional SharePoint developers will be more familiar with building solution manifests and the tooling in Visual Studio is very similar to Solutions.
The thing to remember about Tenant Scope is that you don’t have multiple app web instances. If your app relies on deploying custom SharePoint artifacts on each site then you want Site Scope.
Ex:
Your want a custom time tracking app that can used by multiple teams.
Time tracking information should be specific to each team.
Site Scope
You want to collect company feedback or issue reports in a central location.
Install the app into Tenant Scope.
Users can click on Site Contents > Feedback App to be taken to the “central” form.
Tenant Scope
Note: The add-in is not being deployed to individual sites! It’s simply adding a link back to the add-in in the catalog via a Site Contents tile.
Permission levels must be explicitly accepted by the installing user and only apply to the level granted.
Users must accept permissions to install an app on a site.
Permission level dictates what code can be called in the app.
If selling in Office 365 store can’t do Tenant permissions.
Normally a user logs into the app to execute a SharePoint command.
SharePoint verifies that the Add-In identity and user both have permission.
If you use App-Only permission, then user permission not taken into account.
Ex: App has permission to entire site collection – User does not.