spca2013 - developing provider-hosted apps for sharepoint 2013
Post on 05-Dec-2014
1.915 Views
Preview:
DESCRIPTION
TRANSCRIPT
Donovan FolletteSolution ArchitectMicrosoft
Developing your first Provider-hosted Apps for SharePoint 2013
Thanks to the conference sponsors!
Devices
1 billionsmartphones, 4 years ahead of predictions
Cloud
50%of enterprise customers are “on the road” to cloud
Trends impacting the way we workPeople
For the first time in modern history, workplace demographics now span3 generations
Microsoft’s productivity vision
OnlineOn Premises
Hybrid
Cloud on your terms
Messaging
Voice & Video
Content Management
EnterpriseSocial
Reporting & Analytics
Best experience across devices
Integrated best-of-breed solutions
Apps for Office and SharePointApps
App catalog and store
Vacation request
Event planning
Expense calculator
Learning management
Risk management
Help-desksupport
Products and platforms Services and data
To enable Devs: A new Cloud App Model
The future is now.
The future is now.
The Store on office.com DemoLight up new productivity scenarios with apps from the Store on office.com
The what…
The why… we just covered that
The how…
The what can be…
Agenda
The what…with some how…mixed in
SharePoint App Hosting OptionsSharePoint
The app is hosted in the cloud. Windows Azure and SQL Server Azure components are provisioned automatically when an app is installed. SharePoint artifacts in the App Web (Available for SharePoint Online only)
Existing sites and services
App web
Existing sites and services
App web
The app and all SharePoint artifacts are hosted on your organization’s SharePoint site. Relies on client side technologies. Your IT organization supports the app.
The app and all resources are hosted by the provider in any environment suitable for the app whether on-premises or in the cloud. SharePoint artifacts in the App web
Auto-hosted
SharePointhosted
Existing sites and services
App webWindows Azure & SQL Azure
Oauth + REST or client object models
OAuth + REST or client object models
Shape Description ExampleImmersive Full Page App
App that implements a new scenario for customers
Resource Tracking, Budgeting
App Part Provides new parts you can add to your sites
Weather, News, Stock Ticker
Extension App Add new actions for documents and items
Display Document Visualization, Print to Print Service Vendor
Entry Point / Experience: App Shapes
My first Provider-hosted app DemoAnd a close relative – the Auto-hosted app
(As Immersive apps)
Creating Provider-hosted Apps Create Windows Azure Web Site
Optional - create Windows Azure SQL Database Download publishing profile from Azure Create App for SharePoint in Visual Studio Update appManifest.xml
Application metadata, homepage, Client ID Update Web.config
ClientId, ClientSecret Leverage SharePoint permissions (OAuth), communication (REST / CSOM), & Chrome Control
The app Principal
Register the App Principal for TestingUniquely identifies an app for SharePoint
Create the app principal with AppRegNew.aspxUse the app principal with OAuth for access to SharePoint APIs
http://mySPSite.sharepoint.com/_layouts/15/AppRegNew.aspx
All or nothin
g
The Rich APIs
JavaScript Library
Silverlight Library
.Net CLR Library
Custom Client Code
ClientSharePoint
_api
Execute Query
Supported Client TechnologiesSharePoint 2013 _api
OData / REST
What’s possible with the APIs?
_api
Lists
Sites
Security
User Profiles
Search
Taxonomy
_api
Feeds
Publishing
Sharing
Workflow
E-Discover
y
IRM
Consistent UsageREST/ODatahttps://contoso.sharepoint.com/_api/web/Title
Managed CodeClientContext ctx = new ClientContext("https://contoso.sharepoint.com");ctx.Load(ctx.Web.Title);ctx.ExecuteQuery();
JavaScriptvar context = SP.ClientContext.get_current(); site = context.get_web(); context.load(site); context.executeQueryAsync(function(sender,args){console.log(site.get_title())});
REST URLs in SharePoint 2013 CSOM URLS go through _api folder
Simplifies URLs that need to be built
Use this URLhttps://mySPsite.sharepoint.com/_api
Mapping Objects to Resources Example REST URLs targeting SharePoint sites _api/web/lists
_api/web/lists/getByTitle('Announcements')
_api/web/getAvailableWebTemplates(lcid=1033)
_api/search/query?querytext=‘searchTerm‘
_api/social.feed/my/Feed
_api/social.feed/my/News
_api/social.feed/my/TimelineFeed
Permissions
(Me)
Photo Storing Web
Site
Photo Storing Web
Site
Photo Storing Web
Site
Photo Storing Web
Site
Photo Storing Web
Site
Photo Printing Service
Photo Storing Web
Site
Photo Printing Service
Photo Storing Web
SitePhoto Printing
Service
?Photo
Storing Web Site
Photo Printing Service
Photo Storing Web
SitePhoto Printing
Service
Photo Storing Web
Site
Photo Storing Web
Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View
View
Photo Storing Web
SitePhoto
Storing Web Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment
View, Upload, Tag, Comment
Photo Storing Web
SitePhoto
Storing Web Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment, Change Password
View, Upload, Tag, Comment, Change Password
Photo Storing Web
SitePhoto
Storing Web Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment, Change Password
Photo Storing Web
Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment, Change Password
Photo Storing Web
Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment, Change Password
ViewPhoto
Storing Web Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
View, Upload, Tag, Comment, Change Password
ViewPhoto
Storing Web Site
Photo Storing Web
Site
Photo Printing Service
Photo Printing Service
Apps Request Permission App Permission Scope Defines
Product Permission Provider Target object where the grant is requested
<AppPermissionRequest Scope="http://sharepoint/content/sitecollection" Right="Read"/>
Product PermissionProvider
TargetObject
Capability
The app Principal in Authentication
AuthenticationUser credentialsonly provided?Start
End
User only context
App only context
User + App
context
Anonymous context
App tokenprovided?
App tokenIncludes user?
Yes
No
No No
Yes Yes
Endpoint outsideapp web?
Yes
No
The what can be…
With the new cloud app model for SharePoint and its rich service APIs, your apps can now consume SharePoint better than ever before.
An end-to-end App for SharePoint solution
• Business:• Company desires an on-the-go enabled toolset
for sales personnel to efficiently track/respond to sales leads and win business
• Technical:• Company wants a 100% cloud-based solution
accessible via an array of devices
Scenario Overview
End-to-end Provider-hosted app DemoLead Tracking app for SharePointPowered by Office 365, Windows Azure, Windows 8 & more…
Windows 8 Application
Microsoft Word with an app for Office
Internal O365 SharePoint Site
Windows Azure Web Sites
Workflow Manager
Public O365 SharePoint Site Windows
Azure SQL Database
Clients (Desktop/Tablet/Mobile) Cloud
• View / approve SOWs• Display Excel Services
charts in Word
• View client companies• View sales leads• Receive toast and tile
and raw notifications• View Excel Services
charts• Create estimates
• Contact internal sales personnel to follow up on requests for quotes
• Contact vendors to follow up on requests for quotes
• Approve SOWs• Store Excel Documents• Store SOWs• Host team sites for projects• BCS Sales Leads External List
• Submit requests for quote
• Send notifications• Create SOWs• Update data in Excel
documents• Create SharePoint project
sites
• Facilitate SOW creation, approval, submission, and follow up tasks
• Store sales request data
Windows AzureAccess Control Service• OAuth
• The why…• It’s an ever emerging day for the cloud, devices and services
• The what…• The app model, _api, REST/CSOM, apps with Identity, and more…
• The how…• Code build and deploy
• The what can be...• A look at an end-to-end solution
Summary
The future is now.Build some fantastic apps!
Make plans to:
All things Apps (Sign up for a O365 Dev Site!)dev.office.com
Apps for Office and SharePoint Blogblogs.msdn.com/b/officeapps
My Blogblogs.msdn.com/donovanf
Questionsdonovanf@microsoft.com
Resources
© 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.
top related