sharepoint 2013 apps & workflow - · pdf filefirst of all: we aren’t loosing...

28
SharePoint 2013 Apps & Workflow Paolo Pialorsi [email protected] | @PaoloPia http://www.sharepoint-reference.com/ http://www.pialorsi.com/

Upload: truongkhanh

Post on 14-Feb-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

SharePoint 2013 Apps &

Workflow

Paolo Pialorsi

[email protected] | @PaoloPia

http://www.sharepoint-reference.com/

http://www.pialorsi.com/

Consultant, project manager and trainer since 1996

More than 40 Microsoft certification examsMicrosoft Certified Solutions Master – SharePoint

Focused on SharePoint since 2002

Author of 10 books about XML, SOAP, .NET,LINQ and SharePoint

• Microsoft SharePoint 2013 Developer Reference, Microsoft Press

• Build Windows 8 Apps with Microsoft Visual C# andVisual Basic Step by Step, Microsoft Press

• Microsoft SharePoint 2010 Developer Reference, Microsoft Press

Speaker at main IT conferences

About me

SharePoint 2013 App Model

First of all: we aren’t loosing anything!

Farm solutions

Full trust solutions File system access GAC deploy 14 hive access .NET managed code Inherited from SP2007

Sandbox solutions

Partially trusted code Limited API .NET managed code No access to file system No calls to services

Apps

New model app-oriented

Deployed from corporate catalog or Office Marketplace

Based on web standards No code with server

object mode!

solutions model apps model

SP2010

SP2013

Three types of Apps

App Web

Parent

Web(host web)

SharePoint-Hosted AppProvision 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, HTML/CSS for UX

Auto-Hosted AppWindows Azure + SQL Azure

provisioned invisibly as apps

are installedAzure

SharePoint

Web

Get remote

events from

SharePoint

Use CSOM/REST

+ OAuth to work

with SP

Cloud-based

Apps

Provider-Hosted App“Bring your own server hosting

infrastructure”

Developers will need to isolate

tenants

SharePoint

WebYour Hosted

Site

App Web(optional)

Apps programming model

• Client-side pattern (ALL)

• HTML5, CSS, Javascript

• Leverage Javascript libraries like JQuery, KnockoutJs, Angular, ecc..

• Server-side pattern (CLOUD-ONLY)

• Use your own infrastructure

• Use your language (ASP.NET, PHP, JSP, ecc..)

• Use client-side object model or REST to get info from SharePoint

• Hybrid pattern (CLOUD-ONLY)

• Mix-and-match client-side pattern with server-side pattern

Apps UI options

For a SharePoint dev, these are nothing special...

• Immersive full page - are like application pages, with HTML, CSS, JavaScript and

SharePoint OOB controls

• Part - are simple IFRAMEs

• UI Custom Actions - are SharePoint custom actions like Ribbons or ECB item actions

The new REST API

Agenda

• _api Architecture

• Querying data

• Managing data

• Cross domain calls

• Security

_API architecture

JavaScript Library

Silverlight Library

.Net CLR Library

Custom Client Code

Client

Server

_api is new alias for _vti_bin/client.svc

_api Architecture

RESTOData

JSON

CSOM

_api Consumers

Demo: REST _api

Sample URLs

• _api/web/lists

• _api/web/lists/getByTitle(‘Documents')

• _api/web/Lists/getByTitle('Documents')/Items

• _api/web/Lists/getByTitle('Documents')/Items(4)

• _api/web/CurrentUser

• _api/web/SiteUsers

• _api/web/getAvailableWebTemplates(lcid=1033)

• _api/web/RoleAssignments/GetPrincipalId(1)/Member

Living in a REST-ful world

• REST = Representational State Transfer

• Main capabilities and features

• Lighter than SOAP

• Easier to consume from jQuery/JavaScript

• Can leverage either JSON or ATOM for data representation

• Cross-platform

• URL based

• Securable through OAuth or HTTP security

Supported HTTP methods

• GET: read operations

• POST: creation operations

• PUT: data modification (update)

• All the required fields are mandatory

• PATCH, MERGE: POST + X-Http-Method header

• MERGE for backward compatibility only

• Use PATCH, instead

• DELETE: POST + X-Http-Method header

_api Reference

http(s)://{Host Name}/{site}/_api/{namespace}/

{object}

{property}

{indexer(index)}

{method({parameter},{parameter},…)}

Web Application Hostname

Site Collection (Optional)

API Namespace

Operation

Main namespaces

• site

• web

• SP.UserProfiles.PeopleManager

• ContextInfo

• search

• publishing

• social.feed

Selling/Providing Apps

Available Options

• You can sell you apps through

• Office Store

• SharePoint App Catalog

• Exchange App Catalog (Apps for Office 2013)

• Network Share (Apps for Office 2013)

• Office Store

• Requires registration

• Office 365 valid account

• Corporate Catalog

• IT Pro configuration in the Farm (on-prem or Office 365)

Workflows in SharePoint 2013

Workflow in SharePoint 2010

• Main limits of Workflow in SharePoint 2010?

• Capabilities

• Scalability

• High Availability

• Cloudability

SharePoint Workflow Runtime Engine

Windows Workflow Foundation

TrackingService SchedulerService LoaderServicePersistenceService

Workflow Runtime Host – SP2010/SP2013

Custom PersistenceService

Custom

WorkBatchService

TaskService

WSSServiceExternalData

ExchangeService

SharePoint Workflow Object Model

Office 2010/2013

Client

SP2010/SP2013

Web BrowserCustom Applications

SharePoint 2013 and Workflow Service

SharingContentEvents People

Vis

ua

l S

tud

io

Sh

are

Po

int

De

sig

ne

r

SharePoint

2010 WF

_API (REST OM)

Workflow Services Manager

Service Bus

Instances Interop

Deployment Messaging

WF Service Application Proxy

Workflow Manager

OAuth

Access Control

Work

flow

Clie

nt

Workflow in SharePoint 2013

• All based on markup, no code (more or less …)

• Microsoft SharePoint Designer 2013

• Visual Studio 2012

• Cloud-oriented and app-oriented

• Scalable and highly available

• Secure and safe

• Extensible (somehow …)

Authorization what’s new?

• SharePoint 2010 workflow authorization

• Run as: initiator user

• Run as: publisher user (Impersonation Step)

• Specific for classic workflow

• SharePoint 2013 workflow authorization

• Workflows identity (app principal)

• Default access scope: read/write to site (Web.Write)

• Run as: app & user

• Run as: app only (App Step)

Other news

• Scope

• List workflow

• Site workflow

• No more Content Type workflows

• Models

• Sequential

• Flowchart

• State Machine

• Capabilities

• REST-oriented and HTTP-oriented

• ASP.NET Forms and no more InfoPath

Thanks!

Paolo Pialorsi

[email protected]