SharePoint-hosted Apps

Download Report

Transcript SharePoint-hosted Apps

App development in SharePoint 2013 LIVE
•
•
•
Introducing Cloud App Model
Cloud-hosted Apps
Experiences from the Field
Learn about advanced topics of SharePoint 2013 Cloud App Model development. See how to
create complex SharePoint Apps and leverage tools and frameworks like Knockout and JQuery. In
this session we will do a live demonstration of how to create a Provider-hosted SharePoint App on
Windows Azure websites and deploy it to Office 365.
Objectives:
•
Learn advanced topics of SharePoint Apps development
•
Learn how to leverage frameworks and tools
•
Create advanced provider-hosted apps based on Windows Azure and Office 365
Why do customers want to customize?
Why do customers want to upgrade?
What’s the number one cost driver in projects?
What’s the number one reason for support cases?
What’s the number one issue blocking upgrade?
Custom Code on server
•
Root cause of most SharePoint outages
and issues
•
Lots to deploy
•
Requires a big server touch
•
Not possible in hosted environments
Sandbox Solutions
•
Possible in hosted environment
•
Limited set of things you can do
•
In both, developers must know
SharePoint API
Start doing
Stop doing
•
Evaluate Apps as preferred option
•
Server OM C# Code!
•
Use CSOM or REST
•
New Full Trust Code solutions
•
Leverage JavaScript frameworks, like
Knockout
•
Sandboxed solutions
•
Host business logic outside SharePoint
•
Use remote provisioning
Introducing Cloud App
Model
New apps
A new class of apps enabling new scenarios and user experiences.
Familiar toolsets
Embracing web standards to provide developers with choice and flexibility.
Flexible lifecycle
Deploy and maintain your apps publically or internally with flexibility and control.
Provider-Hosted App
“Bring your own server hosting infrastructure”
SharePoint
Web
Your Hosted
Site
SharePoint
Web
Azure
Cloud-based Apps
Get remote events from
SharePoint
Use CSOM/REST +
OAuth to work with SP
Autohosted App
Windows Azure + SQL Azure
provisioned invisibly as apps are
installed
SharePoint-Hosted App
Provision an isolated sub web on a parent web
• Reuse web elements
(lists, files, out-of-box web parts)
• No server code allowed; use client JavaScript for logic, UX
Parent
Web
App Web
_api is new alias for _vti_bin/client.svc
Server
Client
REST
OData
JSON
CSOM
JavaScript
Library
Silverlight
Library
Custom Client Code
.Net CLR
Library
Cloud-hosted Apps
Cloud-hosted Apps
SharePoint-hosted Apps
•
Preferred hosting model for almost all
types of apps
•
Good for smaller apps & resource
storage
•
Full power of web – choose your
infrastructure & technology
•
SharePoint-based; no server-side code
•
Automatically hosted in SharePoint
•
Inherent multi tenancy & isolation
•
May require your own hosting
•
May require you own handling of multitenancy & permission management
Two Types
Cloud-hosted Model Benefits
•
Provider-hosted Apps
•
Not tied to any SharePoint limitations
•
Azure Autohosted Apps
•
Implement using any technology
desired
•
Communicate w/ SharePoint using open
standards (REST)
•
Establish identity through certificates or
OAuth
Trust models
•
Low-trust apps (ACS enabled scenarios)
•
High-trust apps (S2S trust scenarios)
OAuth Protocol Flow in SharePoint 2013
2
1
4
3
8
5
10
9
6
7
1
SharePoint Authenticates user using claims
2
SharePoint requests context token from user
3
SharePoint requests context token from user
4
SharePoint passes context token to user
5
User POSTS to app passing context token
6
Client App is able to pull refresh token out
of the context token. Client app then passes
refresh token to ACS to request oAuth token
7
ACS returns OAuth token to client app
8
Client App makes CSOM/REST calls to
SharePoint site passing OAuth token
9
SharePoint returns site content to app
10
Client App returns HTML to user device
Demo
Building Cloud-hosted Apps
Utilize styles Host App in your app
•
JavaScript Library in App retrieves style sheet from SharePoint
•
http://{sharepointsite}/_layouts/15/defaultcss.ashx
Apply style sheet to App page
Custom navigation
•
Also allows addition of custom navigation nodes
•
Links to other pages
•
Link to help file
JavaScript Library SP.RequestExecutor.js
•
Located in LAYOUTS directory
Domain Registration
•
To ensure only trusted calls cross domains
•
Specific App permissions must be granted
Communication
•
Hidden IFrame
•
Post Messaging
•
Proxy Page
For OAuth to work a provider based app needs to be registered in advance.
ClientId, ClientSecret
http://<SiteCollectionRoot>/_layouts/15/appregnew.aspx
Experiences From the Field
Office 365
Migrate workloads to Office 365 MT or Dedicated.
PLA
On-premise using Product Line Architectures (PLA) to standardize platform and run SharePoint as a service.
Custom
Custom platform and custom solutions for workloads not applicable to Office 365 or PLA.
Standard
Deprecate customizations and move to standard functionality
Configure
On-premise using Product Line Architectures (PLA) to standardize platform and run SharePoint as a service.
Apps
Custom platform and custom solutions for workloads not applicable to Office 365 or PLA.
Start doing
Stop doing
•
Evaluate Apps as preferred option
•
Server OM C# Code!
•
Use CSOM or REST
•
New Full Trust Code solutions
•
Leverage JavaScript frameworks, like
Knockout
•
Sandboxed solutions
•
Host business logic outside SharePoint
•
Use remote provisioning
Evaluation Scale:
1 = Very bad
2 = Bad
3 = Relevant
4 = Good
5 = Very Good!
Questions:
• Speaker Performance
• Relevance according to your work
• Match of technical level according to
published level
• Comments
Evaluation
Create a Text message on your phone and send it to 1919 with the content:
Session Code
PR401 5 5 5 5 I liked it a lot
Morten
Performance
(1 to 5)
Henrik
Performance
(1 to 5)
Relevance
(1 to 5)
Match of
technical Level
(1 to 5)
Comments
(optional)
© 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing
market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this
presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.