+ All Categories
Home > Technology > From Solutions to Apps - Moving to SP2013

From Solutions to Apps - Moving to SP2013

Date post: 23-Jan-2015
Category:
Upload: bgerman
View: 667 times
Download: 1 times
Share this document with a friend
Description:
SharePoint Saturday NH talk on moving from SharePoint 2010 solutions to SharePoint 2013 apps - by @Bob1German and @SPDCP
24
@Bob1German [email protected] @SPDCP • From Solutions to Apps Bob German Derek Cash- Peterson BlueMetal Architects Moving to SharePoint 2013
Transcript
Page 1: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

From Solutions to Apps

Bob GermanDerek Cash-PetersonBlueMetal Architects

Moving to SharePoint 2013

Page 2: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Agenda

• Apps Model Overview• App Access to SharePoint– RESTful Access– Client Side Object Model (CSOM)– Cross-domain Access– OAuth Access

• Other Topics

Page 3: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Apps 101

HostWeb

AppLink orIFrame

REST orClient OM

Page 4: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

App Hosting Options

HostWeb

App Web

SharePointHosted App

Provider or Auto-Hosted App

AppAzure

or other provider

HostWeb

App Web(optional)

Page 5: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

App

HostWeb

AppWeb

• Auto-hosted apps are provisioned by Office 365 on app installation

• Pretty muchanything goes

• Access hostweb via Oauth

App Hosting Options

App Web• Provisioned by SharePoint on

app installation• No Server Code – period

(though you can leverage installed ASP.NET controls)

• May contain declarative, web-scoped features (lists, site pages, client script, images, css)

• Access host web via cross-domain library

Provider or Azure

Page 6: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

App Isolation

AppAzure

or other provider

HostWeb

App Web(optional)

http://myserver/sites/myweb/

http://app12345/sites/myweb/

http://whatevs.com/somepath/

Different domain names leverage browsers’ same-origin policy

Page 7: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

DEMONSTRATION

Isolated Application shows: - Client Side Object Model - Declarative features in App Site - Simple Client Web Part (“App Part”)

Chord Calculator

Page 8: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

App Access to SharePoint

Page 9: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Choosing an App Model

2010 Model• Reuse and backward

compatibility with existing solutions

• Full access to server OM– Nearly complete access to

everything in SharePoint– Well documented – MSDN,

many books, blogs, etc.

• Leverages SharePoint development skills

2013 Apps• App code is reusable in

SharePoint and Office• Better isolation – no more

leftover web parts and lists• App-level AuthN from Azure

or other provider• No dependency on User

Code Service• Leverages general web

development skills

Page 10: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Choosing an Access Method

REST• Synchronous or

asynchronous in Javascript• Returns entities (e.g.

Contact, Task)• Easier access from jQuery–

no dependency on SP.JS

CSOM• Asynchronous only in

Javascript• Returns SharePoint objects

(e.g. List, ListItem)• Easier access from .NET

server side• Batched requests

Page 11: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Choosing a Hosting Model

SharePoint Hosted• No server side code, period• Access to OOB SharePoint

web controls on the page• Able to store content on

customer’s SP infrastructure

Provider / Azure Hosted• Server-side code• Server is not subject to

cross-domain policy• More flexible data storage

(SQL Azure, etc.)

Page 12: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Accessing Data with Client OMSharePoint Data

SharePoint API

Client.svc

Client Application

Client OM Proxies• .NET CLR• Silverlight• Javascript

OData(REST)

Page 13: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

What’s New in CSOM

• User Profiles• Search• Taxonomy• Feeds• Publishing• Business Connectivity

Services

• Sharing• Workflow• E-Discovery• IRM• Analytics

So much more than simple site and list access!

Page 14: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

DEMONSTRATION

Silverlight App w/Cross-Domain Policy• CSOM Cross-domain Access• CSOM File UploadWebcam Demo

Page 15: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Representational State Transfer (REST)SharePoint Data

SharePoint API

Client Application

ServerApplication

Client Application

ADO.NET Data Svcs Client

JSON ATOM

WPF/WinForm/OfficeSilverlightJavaScript

JSON ATOM

/_api/

Page 16: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Representational State Transfer (REST)

• Operations map to HTTP verbs– Retrieve items/lists GET– Create new item POST– Update an item PUT or MERGE– Delete an item DELETE– These apply to links (lookups) as well

• SharePoint rules apply during updates– Validation, access control, etc.

Derek
Need to add in extensions to REST.
Page 17: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

URL Conventions• Addressing lists and items

List of lists /_api/web/lists

List /_api/web/lists(‘guid’)

List /_api/web/lists/getbytitle(‘Title’)

Items /_api/web/lists/getbytitle('listname')/items

Item /_api/web/lists/getbytitle('listname')/items(1)

Single column /_api/web/lists/getbytitle('listname')/items(1)/fields/getByTitle('Description')

Sorting ?$orderby=Fullname

Filtering $filter=JobTitle eq 'SDE'

Projection ?$select=Fullname,JobTitle

Paging ?$top=10&$skip=30

Inline expansion ?$expand=Project

− Presentation options

Page 18: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

DEMONSTRATION

jQuery App with Cross-Domain LibraryImage Rotator

Page 19: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Open Authentication

• Standard in use by dozens of public sites

• Similar to a valet key– App gives to a partly

trusted 3rd party– Grants limited access

• SharePoint grants theapp access on theuser’s behalf– No need to pass the

user’s credentials– SharePoint can limit the

scope of access

Page 20: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

DEMONSTRATION

Azure-Hosted App with OAuthContacts Map

Page 21: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

Remote Event Receivers• Require a provider or Azure-hosted app• Uses Access Control Services (ACS) token

– Passed from SharePoint to remote web service– Web service can request a token to send back to SharePoint

• SharePoint calls a web service with the following methods:– ProcessEvent() – Synchronous– ProcessOneWayEvent() – Asynchronous

• List, ListItem, Web, and App level scopes• App Events – call AppEventReceiver.svc

– App Installed– App Uninstalling– App Upgraded

• Caveats:– No guaranteed delivery– Watch latency and performance on synchronous events

Page 23: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

ResourcesSharePoint 2013 Development• Host webs, Web apps, and SharePoint Components: http://bit.ly/R3tUiO• Data Access Options for Apps in SharePoint 2013:http://bit.ly/Peeof9 • OAuth and SharePoint 2013: http://bit.ly/Ny1jNd • SharePoint 2013 Workflows: http://bit.ly/PEJCze • Programming using the SharePoint 2013 REST service: http://bit.ly/LR66Ju• Programming using the SP 2013 CSOM (JavaScript): http://bit.ly/OJUARG Contact Us• Bob German - @Bob1German

http://msdn.microsoft.com/[email protected]

• Derek Cash Peterson - @SPDCPhttp://spdcp.com [email protected]

Page 24: From Solutions to Apps - Moving to SP2013

@Bob1German • [email protected]@SPDCP • [email protected]

was made possible by the generous support of the following sponsors…

And by your participation… Thank you!


Recommended