office 365 - introduction to sharepoint online development - sharepoint connections 2013
DESCRIPTION
Slides from my into to SharePoint Online development talk at Dev/IT Connections 2013TRANSCRIPT
Corey RothPrincipal Architect
Infusion
Intro to SharePoint
Online Development
www.devconnections.com
SESSION TITLE
COREY ROTH
Principal Architect at Infusion Development
SP2 Apps for SharePoint 2013 Three-time Microsoft SharePoint MVP Specializing in ECM, Search, and apps
2
www.devconnections.com
SESSION TITLE
3
CONTACT INFO
E-mail: [email protected] Twitter: @coreyroth Blog: www.dotnetmafia.com Apps: www.sp2apps.com
www.devconnections.com
SESSION TITLE
4
WHO IS USING OFFICE 365?
www.devconnections.com
SESSION TITLE
5
THINKING OUTSIDE THE BOX
www.devconnections.com
SESSION TITLE
6
TYPES OF CUSTOMIZATION
Browser-based SharePoint Designer 2013 Sandboxed Solutions App Model
www.devconnections.com
SESSION TITLE
7
CUSTOMIZATION LIMITATIONS
No farm level features No site definitions Cannot modify
built-in SharePoint files
web.config
security policies
No changes to web server or .NET framework
www.devconnections.com
SESSION TITLE
8
WHAT DO YOU NEED?
Office 365 Account Visual Studio 2012 Office Developer Tools No virtual machine required Developer Site Collection
www.devconnections.com
SESSION TITLE
9
CUSTOMIZATIONS WITH VISUAL STUDIO
Sandbox Solutions (deprecated) Apps
www.devconnections.com
SESSION TITLE
10
SANDBOXED SOLUTIONS
Deprecated Some managed code can be deployed Still useful for deploying master pages
www.devconnections.com
SESSION TITLE
11
SHAREPOINT 2013 APP MODEL
www.devconnections.com
SESSION TITLE
12
WHY APPS?
Recommended option for customizations
Allows for different customizations over sandboxed solutions
Code isn’t deployed to the server Works on both SharePoint Online and
on-premises
www.devconnections.com
SESSION TITLE
13
WHAT CAN I DEPLOY WITH APPS?
Lists Workflows Pages Client Web Parts (App Parts) Content Types and Site Columns Ribbon Custom Actions
www.devconnections.com
SESSION TITLE
14
COMPONENTS OF AN APP
Client-side Code Deployable SharePoint Components Features Solution files AppManifest.xml
www.devconnections.com
SESSION TITLE
15
APPMANFIEST.XML
Title, Version, and Icon of app Permissions Prerequisites Supported Locales Remote Endpoints
www.devconnections.com
SESSION TITLE
16
APPS – HOSTING MODELS
SharePoint Hosted Provider Hosted Auto-hosted
www.devconnections.com
SESSION TITLE
17
SHAREPOINT HOSTED APPS
SharePoint hosts the app Client side code using JavaScript No server side code
www.devconnections.com
SESSION TITLE
18
DEMOSharePoint Hosted Apps
www.devconnections.com
SESSION TITLE
19
PROVIDER HOSTED
Host server side code remotely You provide the server(s) Must account for multiple tenants
www.devconnections.com
SESSION TITLE
20
AUTO-HOSTED APPS
Remotely hosted server side code Web application automatically
provisioned with Azure Available only with SharePoint Online Can deploy custom databases
www.devconnections.com
SESSION TITLE
21
SHAREPOINT 2013 APIS
www.devconnections.com
SESSION TITLE
22
API
Client Side APIs required New functionality in REST and CSOM
www.devconnections.com
SESSION TITLE
23
API CHOICES
JavaScript Object Model (JSOM) JavaScript + REST Managed Client Object Model Managed + REST
www.devconnections.com
SESSION TITLE
24
JAVASCRIPT OBJECT MODEL
Similar to 2010 but more functionality User Profile, Taxonomy, Search, etc
Suitable for all app models Managed Metadata only available
through JSOM
www.devconnections.com
SESSION TITLE
25
DEMOJavaScript Object Model
www.devconnections.com
SESSION TITLE
26
REST
www.devconnections.com
SESSION TITLE
27
REST URL STRUCTURE
www.devconnections.com
SESSION TITLE
28
REST QUERY OPTIONS
www.devconnections.com
SESSION TITLE
29
REST URL EXAMPLES
http://server/site/_api/web/lists
http://server/site/_api/web/lists/getbytitle('listname')
http://server/site/_api/web/lists/getbytitle('listname')/items(2)
http://server/_api/search/query?querytext=’SharePoint’
http://server/_api/social.feed/my/news
http://server/_api/SP.UserProfiles.PeopleManager/GetMyProperties
www.devconnections.com
SESSION TITLE
30
REST IN SHAREPOINT
Lists Sites User Profile Social Search Publishing
www.devconnections.com
SESSION TITLE
31
JAVASCRIPT + REST
REST support greatly expanded Old REST services (listdata.svc) deprecated Must specify odata=verbose Build REST URL and use $.ajax()
Include Headers: { “Accept”: “application/json; odata=verbose” }
www.devconnections.com
SESSION TITLE
32
DEMOJavaScript + REST
www.devconnections.com
SESSION TITLE
33
MANAGED CLIENT OBJECT MODEL
Useful for provider hosted apps Similar to JavaScript model With SPO, not required to configure
secrets for authentication
www.devconnections.com
SESSION TITLE
34
MANAGED CLIENT OBJECT MODEL IN APPS
TokenHelper.cs provides code to get a context token
Use TokenHelper to get an access token
Store access token locally for subsequent requests
Use access token to get ClientContext on subsequent requests
www.devconnections.com
SESSION TITLE
35
DEMOProvider Hosted App with Managed Code
www.devconnections.com
SESSION TITLE
36
TEST ENVIRONMENT
Buy another Office 365 Tenant Separate private site collection
www.devconnections.com
SESSION TITLE
RESOURCES
37