SlideShare a Scribd company logo
Deep-dive into SharePoint-hosted
apps
DEV 203
Chris O‟Brien - MVP
About me
Independent Consultant
Head of Development, Content and Code
 Blog: www.sharepointnutsandbolts.com
 Twitter: @ChrisO_Brien
 LinkedIn:
http://uk.linkedin.com/in/chrisobrienmvp
Why apps?
End-user familiarity
Phones, Windows 8 etc.
Move server-side code off SharePoint
..which solves MANY problems for Microsoft 
Game-changer for Office 365
No more sandbox restrictions
Customizing SharePoint – official guidance
Microsoft:
The most important guidance we can give you is
to develop an app for SharePoint rather than a
classic solution whenever you can.
http://msdn.microsoft.com/en-us/library/jj163114(office.15).aspx
App hosting options
SharePoint-hosted
JavaScript only
Cloud app
Provider-hosted (YOU deal with hosting)
–IIS, PHP/LAMP, something else!
Auto-hosted (O365 + Azure)
–E.g. automatically create database in SQL Azure
3 decisions to make on apps
Are we going to allow apps?
Configuration, infrastructure, obtain wildcard SSL certificate etc.
Are we going to allow ANY app from the SharePoint Store to be
installed?
Or are we going to restrict to certain „approved‟ apps via the
internal App Catalog?
Will our own customisations be developed as apps?
The SharePoint apps “enterprise planning loop”
DAY
1:
The SharePoint apps “enterprise planning loop”
DAY
2:
The SharePoint apps “enterprise planning loop”
DAY
3:
The SharePoint apps “enterprise planning loop”
DAY
4:
The SharePoint apps “enterprise planning loop”
DAY
5:
The SharePoint apps “enterprise planning loop”
DAY
6:
How users obtain apps
User-driven:
Public store (if
enabled)
Internal “App
Catalog” – admin-
approved apps
Administrator-
driven:
Installed to
selected sites via
PowerShell
“Tenant-install” –
one shared
instance (not
instance per site)
My app‟s architecture
Ingredients of a nice 2013 “learning” app
Creates and uses some content types/lists/files in app web
Fetches some data from host web (with permission request)
Uses JSOM/REST
Provisions an app part for UX within host web
Consumes farm/tenant services e.g. search
(SharePoint-hosted)
CUSTOM SHAREPOINT-HOSTED
APPS
Developing SharePoint-
hosted apps
SharePoint 2013 client APIs
(for use in SharePoint-hosted apps)
Even though hosted on SP, app area is on an “isolated” domain
(IIS web application)
URL = https://cob-387fbe6473fd9e.spapps.dev/MyApp
–App prefix (configurable)
–ID (generated on each install/upgrade)
–App domain (should be a distinct domain)
–App name
Effectively an IIS trick – content is in same site collection!
Provides some security against XSS + allows identification of app
requests
How the app web works
Accessing Site Contents page (ViewLsts.aspx)
Accessing Site Settings page (Settings.aspx)
Accessing Features pages
(Features.aspx?Scope=Site/Web)
Computer says no:
Yes:
• ListView web part
• XsltListView web part
• Content Search web part
• Search Core Results
web part
• PageViewer web part
No:
• Content Query web part
• DataView web part
• ..probably many others
Which web parts can I use in the app web?
App parts
App parts - gotchas
Need appropriate JS files referenced
 See Stephane Eskeyens post - http://www.silver-
it.com/node/126
No _spPageContextInfo if code hosted in app
part
 Be careful if you have code which uses it
 But do have access to SPAppWebUrl/SPHostUrl
Need <meta http-equiv=”X-UA-Compatible”..
element
Useful trick:
App part page
dynamically
resizing parent
iFrame (using
postMessage)
Apps which provision into the
host web
..brand a SharePoint site?
..provision files into a SharePoint site?
..delete end-user data?
ANSWER:
If it has the right permissions, yes (*)
Full Control of Web = do anything 
Host web considerations: can an app?
* Assumes that:
• User ALSO has
appropriate
permissions
OR
• App uses “app-
only” policy (not
SP-hosted app)
Office 365 submission policy – no Full Control
http://msdn.microsoft.com/en-us/library/jj938162.aspx
APPS WHICH PROVISION INTO THE
HOST WEB
Other things
 SPHostUrl bug – this URL param „lost‟ when navigating
around app web (causing code to fail)
 Search bug – app with Permission Request for
Search/QueryAsUserIgnoreAppPrincipal gives “Only
tenant administrators can install this app” for on-premises
installations
ALSO: can now run multiple app domains with reverse
proxy/AAM
Bugs fixed in March 2013 update (all undocumented!)
Microsoft:
Secure Sockets Layer (SSL) is a requirement for web applications
that are deployed in scenarios that support server-to-server
authentication and app authentication.
http://technet.microsoft.com/en-us/library/ee806885(v=office.15).aspx
Apps and SSL
Configuring SSL in dev
Pre-reqs:
 DNS - entries created (wildcard for apps, unique IP for apps WA)
 IIS - ensure apps WA uses „All Unassigned‟
Use SELFSSL to generate certs
 Sites (wildcard = *.cob.dev, or individual)
 Apps (wildcard = *.spapps.dev)
Export as .pfx then import (SELFSSL bug)
Re-bind certs in IIS
IISReset!
Continuous Integration for apps
Microsoft have released PS scripts
 See http://officesharepointci.codeplex.com
 Works with on-premises or Office 365
 Uses PS + .NET CSOM to install app
Support for:
 SharePoint-hosted apps
 Provider-hosted apps (via WebDeploy)
Can be used with visualstudio.com (TFS online)
Can I use navigation controls/providers?
 Unlikely. Providers have context of host web, not app
web.
 Static links likely to be better
WebDAV is disabled for apps
SP-hosted apps currently cannot be used on SAML
claims sites
Other notes:
Some beginner issues
1. Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is
not enabled on this site
 You tried to “F5 deploy” to a site not based on Developer Site template OR sideloading
Feature is not activated
2. JavaScript runtime error: 'Type' is undefined
 JavaScript dependency issue – MicrosoftAjax.js needs to be earlier!
3. App part difficulties (e.g. JavaScript errors)
 Need correct JS references – see http://www.silver-it.com/node/126
 Need AllowFraming tag and <meta http-equiv..tags
 No _spPageContextInfo
Troubleshooting apps
Advanced topics
1. Updatability – CSS/JS/images are difficult to update across app instances
(OR SANDBOX!)
 ANSWER: Use Azure (or internally hosted location) to centralise
2. Architecture – should I deploy to the host web?
 ANSWER :
–Maybe, if the app is trusted
–But what is the app framework giving you over a sandbox/farm solution?
Designing SharePoint-hosted apps
Possible reasons for cloud app
Need to go beyond JavaScript
to develop functionality
 E.g. service layer
 E.g. use of back-end non-
SharePoint data
Needs Remote Event
Receivers (app installed, app
upgraded etc.)
Needs scheduled process
On-prem SharePoint sites
using SAML claims
You don‟t want to develop
entire app in JavaScript
 OR, you want to leverage
.Net/PHP/whatever skills
Thank you for attending!
www.sharepointnutsandbolts.com
@ChrisO_Brien

More Related Content

What's hot (20)

PPTX
The SharePoint 2013 App Model
SPC Adriatics
 
PPTX
Developing SharePoint 2013 apps with Visual Studio 2012 - Microsoft TechDays ...
Bram de Jager
 
PPTX
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
BlueMetalInc
 
PPTX
Introducing the new SharePoint 2013 app model
Jeremy Thake
 
PPTX
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
NCCOMMS
 
PDF
Practical management of development & QA environments for SharePoint 2013
SharePointRadi
 
PPTX
Sviluppare App per Office 2013 e SharePoint 2013
Giuseppe Marchi
 
PPTX
SharePoint 2013 Sneak Peek
Shailen Sukul
 
PDF
Hooking SharePoint APIs with Android
Kris Wagner
 
PPTX
Introduction to the new SharePoint 2013 App Model
Noorez Khamis
 
PPTX
SharePoint 2013 App Provisioning Models
Shailen Sukul
 
PPTX
Developing Apps for SharePoint Store
Kashif Imran
 
PPTX
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
SPTechCon
 
PPTX
Visio Services in SharePoint 2010
Alexander Meijers
 
PPTX
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
PDF
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Nik Patel
 
PPTX
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
Sanjay Patel
 
PPTX
SharePoint 2013 apps overview
Elie Kash
 
PPTX
Gabriel Gayhart - XML Pointer File Example
linkedinsys
 
PPTX
Designing SharePoint solutions – Big Decisions for Big Success
SPC Adriatics
 
The SharePoint 2013 App Model
SPC Adriatics
 
Developing SharePoint 2013 apps with Visual Studio 2012 - Microsoft TechDays ...
Bram de Jager
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
BlueMetalInc
 
Introducing the new SharePoint 2013 app model
Jeremy Thake
 
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
NCCOMMS
 
Practical management of development & QA environments for SharePoint 2013
SharePointRadi
 
Sviluppare App per Office 2013 e SharePoint 2013
Giuseppe Marchi
 
SharePoint 2013 Sneak Peek
Shailen Sukul
 
Hooking SharePoint APIs with Android
Kris Wagner
 
Introduction to the new SharePoint 2013 App Model
Noorez Khamis
 
SharePoint 2013 App Provisioning Models
Shailen Sukul
 
Developing Apps for SharePoint Store
Kashif Imran
 
Building Apps for SharePoint 2013 by Andrew Connell - SPTechCon
SPTechCon
 
Visio Services in SharePoint 2010
Alexander Meijers
 
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
Understanding SharePoint 2013 Code Deployment Models - Apps vs Solutions - Sh...
Nik Patel
 
SharePoint 2013 “App Model” Developing and Deploying Provider Hosted Apps
Sanjay Patel
 
SharePoint 2013 apps overview
Elie Kash
 
Gabriel Gayhart - XML Pointer File Example
linkedinsys
 
Designing SharePoint solutions – Big Decisions for Big Success
SPC Adriatics
 

Viewers also liked (9)

PPTX
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
Randy Williams
 
PPTX
SharePoint Apps 101
Ronald Courville
 
PDF
SharePoint Hosted Apps
David J Rosenthal
 
PDF
SharePoint App Types at a Glance
David J Rosenthal
 
PDF
SharePoint 2013 Hosted-Apps (On-Premises) - Infrastructure Setup
vmaximiuk
 
PPTX
Apps for SharePoint 2013
Melick Baranasooriya
 
PPTX
Developing a provider hosted share point app
Talbott Crowell
 
PPTX
JSOM and java script practices
Melick Baranasooriya
 
PPTX
Access share point-2013-data-with-provider-hosted-apps
Alexander Meijers
 
An IT Pro Guide to Deploying and Managing SharePoint 2013 Apps
Randy Williams
 
SharePoint Apps 101
Ronald Courville
 
SharePoint Hosted Apps
David J Rosenthal
 
SharePoint App Types at a Glance
David J Rosenthal
 
SharePoint 2013 Hosted-Apps (On-Premises) - Infrastructure Setup
vmaximiuk
 
Apps for SharePoint 2013
Melick Baranasooriya
 
Developing a provider hosted share point app
Talbott Crowell
 
JSOM and java script practices
Melick Baranasooriya
 
Access share point-2013-data-with-provider-hosted-apps
Alexander Meijers
 
Ad

Similar to Deep dive into SharePoint 2013 hosted apps - Chris OBrien (20)

PPTX
2014 SharePoint Saturday Melbourne Apps or not to Apps
Gilles Pommier
 
PPTX
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien
 
PPTX
Getting started with SharePoint 2013 online development
Jeremy Thake
 
PPTX
Essential Knowledge for SharePoint Add-Ins
InnoTech
 
PPTX
SharePoint Server 2013: to app or not to app?
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPTX
Getting Started with SharePoint 2013 Apps
Randy Williams
 
PDF
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Fabio Franzini
 
PDF
(Almost) All About Apps for SharePoint 2013
Dragan Panjkov
 
PPTX
SP Apps, New Model, New App Store: The Office Store
Juan Carlos Gonzalez
 
PPTX
Prepararsi a spostare le proprie applicazioni share point su office 365
Giuseppe Marchi
 
PPTX
Relearning SharePoint Development
bgerman
 
PPTX
SharePoint Saturday Silicon Valley - SharePoint Apps - Ryan Schouten
Ryan Schouten
 
PPTX
SharePoint 2013 App or Not to App
Kenneth Maglio
 
PPTX
Developing Apps for SharePoint 2013
SPC Adriatics
 
PPTX
MSDN - SharePoint 2013 to app or not to app
Joris Poelmans
 
PPTX
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
PPT
Build Database Applications for SharePoint!
Iron Speed
 
PPT
Build Database Applications for SharePoint
Iron Speed
 
PDF
Chicago ALM User Group - Nov 2014 - Application Insights 101
Angela Dugan
 
PPTX
SharePoint Development with Visual Studio 2012
Thuan Ng
 
2014 SharePoint Saturday Melbourne Apps or not to Apps
Gilles Pommier
 
Chris O'Brien - Comparing SharePoint add-ins (apps) with Office 365 apps
Chris O'Brien
 
Getting started with SharePoint 2013 online development
Jeremy Thake
 
Essential Knowledge for SharePoint Add-Ins
InnoTech
 
SharePoint Server 2013: to app or not to app?
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Getting Started with SharePoint 2013 Apps
Randy Williams
 
Come riprogettare le attuali farm solution di share point con il nuovo modell...
Fabio Franzini
 
(Almost) All About Apps for SharePoint 2013
Dragan Panjkov
 
SP Apps, New Model, New App Store: The Office Store
Juan Carlos Gonzalez
 
Prepararsi a spostare le proprie applicazioni share point su office 365
Giuseppe Marchi
 
Relearning SharePoint Development
bgerman
 
SharePoint Saturday Silicon Valley - SharePoint Apps - Ryan Schouten
Ryan Schouten
 
SharePoint 2013 App or Not to App
Kenneth Maglio
 
Developing Apps for SharePoint 2013
SPC Adriatics
 
MSDN - SharePoint 2013 to app or not to app
Joris Poelmans
 
SharePoint Framework -The future of SharePoint/ Office 365 developer ecosystem.
Kushan Lahiru Perera
 
Build Database Applications for SharePoint!
Iron Speed
 
Build Database Applications for SharePoint
Iron Speed
 
Chicago ALM User Group - Nov 2014 - Application Insights 101
Angela Dugan
 
SharePoint Development with Visual Studio 2012
Thuan Ng
 
Ad

More from Chris O'Brien (20)

PPTX
Chris O'Brien - Building AI into Power Platform solutions
Chris O'Brien
 
PPTX
Chris OBrien - Azure DevOps for managing work
Chris O'Brien
 
PPTX
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien
 
PPTX
COB ESPC18 - Rich PowerApps with offline support
Chris O'Brien
 
PPTX
COB - Azure Functions for Office 365 developers
Chris O'Brien
 
PPTX
COB - PowerApps - the good, the bad and the ugly - early 2018
Chris O'Brien
 
PPTX
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
PPTX
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien
 
PPTX
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien
 
PPTX
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 
PPTX
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien
 
PPTX
Application Lifecycle Management for Office 365 development
Chris O'Brien
 
PPTX
Do's and don'ts for Office 365 development
Chris O'Brien
 
PPTX
Chris OBrien - Weaving Enterprise Solutions into Office Products
Chris O'Brien
 
PPTX
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien
 
PPTX
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien
 
PPTX
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
PPTX
SP2013 for Developers - Chris O'Brien
Chris O'Brien
 
PPTX
Getting to grips with SharePoint 2013 apps - Chris O'Brien
Chris O'Brien
 
PPTX
SharePoint Ribbon Deep Dive
Chris O'Brien
 
Chris O'Brien - Building AI into Power Platform solutions
Chris O'Brien
 
Chris OBrien - Azure DevOps for managing work
Chris O'Brien
 
Chris O'Brien - Ignite 2019 announcements and selected roadmaps
Chris O'Brien
 
COB ESPC18 - Rich PowerApps with offline support
Chris O'Brien
 
COB - Azure Functions for Office 365 developers
Chris O'Brien
 
COB - PowerApps - the good, the bad and the ugly - early 2018
Chris O'Brien
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
Chris O'Brien - Best bits of Azure for Office 365/SharePoint developers
Chris O'Brien
 
Chris O'Brien - Intro to Power BI for Office 365 devs (March 2017)
Chris O'Brien
 
Chris O'Brien - Modern SharePoint sites and the SharePoint Framework - reference
Chris O'Brien
 
Chris O'Brien - Introduction to the SharePoint Framework for developers
Chris O'Brien
 
Application Lifecycle Management for Office 365 development
Chris O'Brien
 
Do's and don'ts for Office 365 development
Chris O'Brien
 
Chris OBrien - Weaving Enterprise Solutions into Office Products
Chris O'Brien
 
Chris O'Brien - Modern SharePoint development: techniques for moving code off...
Chris O'Brien
 
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien
 
Customizing the SharePoint 2013 user interface with JavaScript - Chris OBrien
Chris O'Brien
 
SP2013 for Developers - Chris O'Brien
Chris O'Brien
 
Getting to grips with SharePoint 2013 apps - Chris O'Brien
Chris O'Brien
 
SharePoint Ribbon Deep Dive
Chris O'Brien
 

Recently uploaded (20)

PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 

Deep dive into SharePoint 2013 hosted apps - Chris OBrien

  • 1. Deep-dive into SharePoint-hosted apps DEV 203 Chris O‟Brien - MVP
  • 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. Why apps? End-user familiarity Phones, Windows 8 etc. Move server-side code off SharePoint ..which solves MANY problems for Microsoft  Game-changer for Office 365 No more sandbox restrictions
  • 4. Customizing SharePoint – official guidance Microsoft: The most important guidance we can give you is to develop an app for SharePoint rather than a classic solution whenever you can. http://msdn.microsoft.com/en-us/library/jj163114(office.15).aspx
  • 5. App hosting options SharePoint-hosted JavaScript only Cloud app Provider-hosted (YOU deal with hosting) –IIS, PHP/LAMP, something else! Auto-hosted (O365 + Azure) –E.g. automatically create database in SQL Azure
  • 6. 3 decisions to make on apps Are we going to allow apps? Configuration, infrastructure, obtain wildcard SSL certificate etc. Are we going to allow ANY app from the SharePoint Store to be installed? Or are we going to restrict to certain „approved‟ apps via the internal App Catalog? Will our own customisations be developed as apps?
  • 7. The SharePoint apps “enterprise planning loop” DAY 1:
  • 8. The SharePoint apps “enterprise planning loop” DAY 2:
  • 9. The SharePoint apps “enterprise planning loop” DAY 3:
  • 10. The SharePoint apps “enterprise planning loop” DAY 4:
  • 11. The SharePoint apps “enterprise planning loop” DAY 5:
  • 12. The SharePoint apps “enterprise planning loop” DAY 6:
  • 13. How users obtain apps User-driven: Public store (if enabled) Internal “App Catalog” – admin- approved apps Administrator- driven: Installed to selected sites via PowerShell “Tenant-install” – one shared instance (not instance per site)
  • 15. Ingredients of a nice 2013 “learning” app Creates and uses some content types/lists/files in app web Fetches some data from host web (with permission request) Uses JSOM/REST Provisions an app part for UX within host web Consumes farm/tenant services e.g. search (SharePoint-hosted)
  • 18. SharePoint 2013 client APIs (for use in SharePoint-hosted apps)
  • 19. Even though hosted on SP, app area is on an “isolated” domain (IIS web application) URL = https://cob-387fbe6473fd9e.spapps.dev/MyApp –App prefix (configurable) –ID (generated on each install/upgrade) –App domain (should be a distinct domain) –App name Effectively an IIS trick – content is in same site collection! Provides some security against XSS + allows identification of app requests How the app web works
  • 20. Accessing Site Contents page (ViewLsts.aspx) Accessing Site Settings page (Settings.aspx) Accessing Features pages (Features.aspx?Scope=Site/Web) Computer says no:
  • 21. Yes: • ListView web part • XsltListView web part • Content Search web part • Search Core Results web part • PageViewer web part No: • Content Query web part • DataView web part • ..probably many others Which web parts can I use in the app web?
  • 23. App parts - gotchas Need appropriate JS files referenced  See Stephane Eskeyens post - http://www.silver- it.com/node/126 No _spPageContextInfo if code hosted in app part  Be careful if you have code which uses it  But do have access to SPAppWebUrl/SPHostUrl Need <meta http-equiv=”X-UA-Compatible”.. element Useful trick: App part page dynamically resizing parent iFrame (using postMessage)
  • 24. Apps which provision into the host web
  • 25. ..brand a SharePoint site? ..provision files into a SharePoint site? ..delete end-user data? ANSWER: If it has the right permissions, yes (*) Full Control of Web = do anything  Host web considerations: can an app? * Assumes that: • User ALSO has appropriate permissions OR • App uses “app- only” policy (not SP-hosted app)
  • 26. Office 365 submission policy – no Full Control http://msdn.microsoft.com/en-us/library/jj938162.aspx
  • 27. APPS WHICH PROVISION INTO THE HOST WEB
  • 29.  SPHostUrl bug – this URL param „lost‟ when navigating around app web (causing code to fail)  Search bug – app with Permission Request for Search/QueryAsUserIgnoreAppPrincipal gives “Only tenant administrators can install this app” for on-premises installations ALSO: can now run multiple app domains with reverse proxy/AAM Bugs fixed in March 2013 update (all undocumented!)
  • 30. Microsoft: Secure Sockets Layer (SSL) is a requirement for web applications that are deployed in scenarios that support server-to-server authentication and app authentication. http://technet.microsoft.com/en-us/library/ee806885(v=office.15).aspx Apps and SSL
  • 31. Configuring SSL in dev Pre-reqs:  DNS - entries created (wildcard for apps, unique IP for apps WA)  IIS - ensure apps WA uses „All Unassigned‟ Use SELFSSL to generate certs  Sites (wildcard = *.cob.dev, or individual)  Apps (wildcard = *.spapps.dev) Export as .pfx then import (SELFSSL bug) Re-bind certs in IIS IISReset!
  • 32. Continuous Integration for apps Microsoft have released PS scripts  See http://officesharepointci.codeplex.com  Works with on-premises or Office 365  Uses PS + .NET CSOM to install app Support for:  SharePoint-hosted apps  Provider-hosted apps (via WebDeploy) Can be used with visualstudio.com (TFS online)
  • 33. Can I use navigation controls/providers?  Unlikely. Providers have context of host web, not app web.  Static links likely to be better WebDAV is disabled for apps SP-hosted apps currently cannot be used on SAML claims sites Other notes:
  • 34. Some beginner issues 1. Error occurred in deployment step 'Install app for SharePoint': Sideloading of apps is not enabled on this site  You tried to “F5 deploy” to a site not based on Developer Site template OR sideloading Feature is not activated 2. JavaScript runtime error: 'Type' is undefined  JavaScript dependency issue – MicrosoftAjax.js needs to be earlier! 3. App part difficulties (e.g. JavaScript errors)  Need correct JS references – see http://www.silver-it.com/node/126  Need AllowFraming tag and <meta http-equiv..tags  No _spPageContextInfo Troubleshooting apps
  • 35. Advanced topics 1. Updatability – CSS/JS/images are difficult to update across app instances (OR SANDBOX!)  ANSWER: Use Azure (or internally hosted location) to centralise 2. Architecture – should I deploy to the host web?  ANSWER : –Maybe, if the app is trusted –But what is the app framework giving you over a sandbox/farm solution? Designing SharePoint-hosted apps
  • 36. Possible reasons for cloud app Need to go beyond JavaScript to develop functionality  E.g. service layer  E.g. use of back-end non- SharePoint data Needs Remote Event Receivers (app installed, app upgraded etc.) Needs scheduled process On-prem SharePoint sites using SAML claims You don‟t want to develop entire app in JavaScript  OR, you want to leverage .Net/PHP/whatever skills
  • 37. Thank you for attending! www.sharepointnutsandbolts.com @ChrisO_Brien