basel bern lausanne zurich düsseldorf frankfurt/m. freiburg i. br. hamburg munich stuttgart vienna...

49
Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant Simon.Amrein@trivadis .com Wallisellen, 05.10.2010

Upload: kaden-draper

Post on 01-Apr-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna

SharePoint 2010 Composites (Teil II)

Simon [email protected]

Wallisellen, 05.10.2010

Page 2: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites

Simon Amrein Consultant Entwicklung von SharePoint und .Net Projekten Referent

Erfahrung C# seit 2002 SharePoint seit WSS 3.0 / MOSS 2007 Beta 2

Referent SharePoint und .Net Schulungen für Trivadis AG Ignite Training für Microsoft in der Schweiz MSDN TechTalks Certification BootCamp SharePoint 2010 Application Development Shape 26. Oktober 2010, Swissôtel Zürich

Vorstellung

2

Page 3: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites

Agenda

Data are always part of the game.

SharePoint & WF

SharePoint & External Data

SharePoint & Silverlight on the Client

3

Page 4: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint 2010 Workflow – How to Start?

I identified a business need…

But how do I start now???

MSDN TechTalk - SharePoint 2010 Composites4

Page 5: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint WF – How to Start? – Bad Idea

WRONG…

MSDN TechTalk - SharePoint 2010 Composites5

Page 6: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Better…

MSDN TechTalk - SharePoint 2010 Composites

SharePoint WF – How to Start? – Better Idea

6

Page 7: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

You’ve got it…

MSDN TechTalk - SharePoint 2010 Composites

SharePoint WF – How to Start? – Best Idea

But when should I use what?

7

Page 8: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint 2010 - Workflows

SharePoint 2010 Workflow based on .NET Framework 3.5 SP1

Sequential & State Machine Workflow

New Workflow events: Starting Started Postponed Completed

MSDN TechTalk - SharePoint 2010 Composites8

Page 9: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint 2010 Workflow Spectrum

MSDN TechTalk - SharePoint 2010 Composites

Quelle: SharePoint Conference

9

Page 10: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Workflow with Visio

Business Engineers design the Workflow

«Microsoft SharePoint Workflow» Template (Sequential)

MSDN TechTalk - SharePoint 2010 Composites10

Page 11: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Workflow – Visio Activities

MSDN TechTalk - SharePoint 2010 Composites11

Page 12: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Workflow - Export

Export Workflow as an Visio interchange format

MSDN TechTalk - SharePoint 2010 Composites12

Page 13: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

DEMO

MSDN TechTalk - SharePoint 2010 Composites

Visio

13

Page 14: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Workflow with SharePoint Designer 2010

SharePoint Designer 2010 – Intuitive

Site Workflow

Reusable Workflow

Customize OOB Workflows

High Privilege Impersonation Step

MSDN TechTalk - SharePoint 2010 Composites14

Page 15: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer – Create new Workflow

MSDN TechTalk - SharePoint 2010 Composites15

Page 16: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer - WF

Actions & Conditions

MSDN TechTalk - SharePoint 2010 Composites16

Page 17: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer - Actions & Conditions

Overview

MSDN TechTalk - SharePoint 2010 Composites

http://office.microsoft.com/en-us/visio-help/sharepoint-workflow-template-shapes-guide-HA101903894.aspx

17

Page 18: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer - Visualisation

MSDN TechTalk - SharePoint 2010 Composites18

Page 19: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer – Save as a Template

Extend Workflow in Visual Studio 2010

MSDN TechTalk - SharePoint 2010 Composites19

Page 20: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

DEMO

MSDN TechTalk - SharePoint 2010 Composites

SharePoint Designer

20

Page 21: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Workflow with Visual Studio 2010

MSDN TechTalk - SharePoint 2010 Composites

Only Farm Solution

WorkFlows: Sequential State Machine

Type: Site List

21

Page 22: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SharePoint Designer 2010

Derive from: System.Workflow.ComponentModel.Activity

Override Methode ActivityExecutionStatus Execute(System.Workflow.ComponentModel.ActivityExecutionContext executionContext)

Adding a custom .actions into %SPRoot%\Template\1033\Workflow

Register Assemblies

MSDN TechTalk - SharePoint 2010 Composites22

Page 23: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SharePoint Designer 2010

MSDN TechTalk - SharePoint 2010 Composites23

Page 24: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SharePoint Designer 2010

MSDN TechTalk - SharePoint 2010 Composites24

.actions File

Page 25: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SharePoint Designer 2010

MSDN TechTalk - SharePoint 2010 Composites25

Web.Config

Page 26: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SharePoint Designer 2010

MSDN TechTalk - SharePoint 2010 Composites26

Page 27: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SPD 2010 - IE

MSDN TechTalk - SharePoint 2010 Composites27

Page 28: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Activity for SPD 2010 - Visio

MSDN TechTalk - SharePoint 2010 Composites28

Page 29: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Demo

MSDN TechTalk - SharePoint 2010 Composites

Custom Action

29

Page 30: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites

Agenda

Data are always part of the game.

SharePoint & WF

SharePoint & External Data

SharePoint & Silverlight on the Client

30

Page 31: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint 2010 – External Data

Remember 2007 We were able to read external data We had SharePoint Designer 2007

MSDN TechTalk - SharePoint 2010 Composites

But know we are in the year 2010!

We used 3th Party Tools…

31

Page 32: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint 2010 – External Data

Again – We have different Tools

MSDN TechTalk - SharePoint 2010 Composites32

Page 33: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Solution Types, Personas and Tools

Power User / No code RAD Dev

• OOB UX on thin and rich clients (Outlook and Groove) based on External Lists

• Connect to existing back-end integration services or simple databases

• Transparent packaging (managed by BCS)

Advanced

Advanced Dev Custom Code

• Custom UX and data integration on thin and rich clients (apps that support VSTO add-ins)

• Custom back-end connectivity through .Net objects

• Explicit packaging (managed by dev)

SharePoint Designer

Simple

MSDN TechTalk - SharePoint 2010 Composites33

Page 34: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Development ApproachesSharePoint Server

(Prod / Dev)IT Admin

Import & ConfigureWSP/BDC

SI/IT Devs

“Live” connection

SharePoint Designer

No code, discover and configure existing back-end integration end-points

Connect to (existing) WCF, ADO.Net and .Net Objects

Simultaneously author thin and rich client UX for External List and InfoPath Forms

Pro Dev

Produce WSP/ClickOnce Package w/BDC Model

WSP/ ClickOnce Package

Create custom back-end integration logic using .Net code

Author thin and rich client UX (independently) as SharePoint and VSTO customization projects

MSDN TechTalk - SharePoint 2010 Composites34

Page 35: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

SharePoint Designer

Connecting to an externaldatasource – Just a fewclicks to go…

MSDN TechTalk - SharePoint 2010 Composites35

Page 36: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Visual Studio 2010 Support

The tool for creating “.NET Connectors”

MSDN TechTalk - SharePoint 2010 Composites36

Page 37: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Business Data Catalog Methods

MSDN TechTalk - SharePoint 2010 Composites

public static MyEntity ReadItem(int myEntityID){ //Return a single entity based on the identifier input}public static IEnumerable<MyEntity> ReadList(){ //Return a collection of entities}public static void Delete(int myEntityID){ //Delete data based on the identifier input}public static void Update(MyEntity myEntity){ //Update data based on the properties of the entity input}public static MyEntity Create(MyEntity newMyEntity){ //Add new data based on the properties of the entity input}

37

Page 38: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites38

Demo

External List – Visual Studio

Page 39: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites

Agenda

Data are always part of the game.

SharePoint & WF

SharePoint & External Data

SharePoint & Silverlight on the Client

39

Page 40: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Customer Request…

We would like to access more data from SharePoint – So, we need more web-services!

MSDN TechTalk - SharePoint 2010 Composites

But this would end in a web-services hell…

Microsoft introduced the Client Object Model

40

Page 41: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Client Object Model

MSDN TechTalk - SharePoint 2010 Composites41

Page 42: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Client Object Model

Server (Microsoft.SharePoint)

.NET Managed(Microsoft.SharePoint.Client)

Silverlight(Microsoft.SharePoint.Client.Silverlight)

ECMAScript(SP.js)

SPContext ClientContext ClientContext ClientContext

SPSite Site Site Site

SPWeb Web Web Web

SPList List List List

SPListItem ListItem ListItem ListItem

SPField Field Field Field

MSDN TechTalk - SharePoint 2010 Composites42

Page 43: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Work with Object Model

1. Define, where you want to conntect to...

2. Define, with what you want to work with...

3. Load what you have defined

4. Execute load process

MSDN TechTalk - SharePoint 2010 Composites43

Page 44: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

ClientContext

Return the context for a client request

MSDN TechTalk - SharePoint 2010 Composites

using System;using Microsoft.SharePoint.Client;

namespace Microsoft.SDK.SharePointServices.Samples { class WebSiteTitle { static void Main() { ClientContext clientContext = new ClientContext("http://MyServer/");

// ClientContext.Current; Web oWebsite = clientContext.Web; } }}

44

Page 45: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Load Objects

Load (void)

LoadQuery(IEnumerable)

MSDN TechTalk - SharePoint 2010 Composites

clientContext.Load(oWebsite, website => website.Title);

listInfo = clientContext.LoadQuery( collList.Include( list => list.Title, list => list.Fields.Include( field => field.Title, field => field.Id).Where( Id => field.Required == true)));

45

Page 46: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010

Execute Query

Execute()(synchronous)

ExecuteQueryAsync(SuccesHandler, FailureHandler)(asynchronous)

The Silverlight client object model provides both an ExecuteQuery() method, which can be called synchronously from threads that do not modify the user interface (UI), and an asynchronous ExecuteQueryAsync() method for cases where threads do modify the UI.”

MSDN TechTalk - SharePoint 2010 Composites46

Page 47: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites47

Demo

SharePoint & Silverlight

Page 48: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

© 2010MSDN TechTalk - SharePoint 2010 Composites48

Courses

The Swiss PDC 201028.10.2010 16:00 – 22:00 Zurich

Microsoft SharePoint 2010 Application Development (M-10175)13.12.2010 – 17.12.2010 Zurichwww.trivadis.com

Bootcamp for 70-573 TS: Microsoft SharePoint 2010, Application DevelopmentDecember, February Zurich

Page 49: Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna SharePoint 2010 Composites (Teil II) Simon Amrein Consultant

www.trivadis.com

Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna

Thank you!