Upload
kaden-draper
View
217
Download
2
Embed Size (px)
Citation preview
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
© 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
© 2010MSDN TechTalk - SharePoint 2010 Composites
Agenda
Data are always part of the game.
SharePoint & WF
SharePoint & External Data
SharePoint & Silverlight on the Client
3
© 2010
SharePoint 2010 Workflow – How to Start?
I identified a business need…
But how do I start now???
MSDN TechTalk - SharePoint 2010 Composites4
© 2010
SharePoint WF – How to Start? – Bad Idea
WRONG…
MSDN TechTalk - SharePoint 2010 Composites5
© 2010
Better…
MSDN TechTalk - SharePoint 2010 Composites
SharePoint WF – How to Start? – Better Idea
6
© 2010
You’ve got it…
MSDN TechTalk - SharePoint 2010 Composites
SharePoint WF – How to Start? – Best Idea
But when should I use what?
7
© 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
© 2010
SharePoint 2010 Workflow Spectrum
MSDN TechTalk - SharePoint 2010 Composites
Quelle: SharePoint Conference
9
© 2010
SharePoint Workflow with Visio
Business Engineers design the Workflow
«Microsoft SharePoint Workflow» Template (Sequential)
MSDN TechTalk - SharePoint 2010 Composites10
© 2010
SharePoint Workflow – Visio Activities
MSDN TechTalk - SharePoint 2010 Composites11
© 2010
SharePoint Workflow - Export
Export Workflow as an Visio interchange format
MSDN TechTalk - SharePoint 2010 Composites12
© 2010
DEMO
MSDN TechTalk - SharePoint 2010 Composites
Visio
13
© 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
© 2010
SharePoint Designer – Create new Workflow
MSDN TechTalk - SharePoint 2010 Composites15
© 2010
SharePoint Designer - WF
Actions & Conditions
MSDN TechTalk - SharePoint 2010 Composites16
© 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
© 2010
SharePoint Designer - Visualisation
MSDN TechTalk - SharePoint 2010 Composites18
© 2010
SharePoint Designer – Save as a Template
Extend Workflow in Visual Studio 2010
MSDN TechTalk - SharePoint 2010 Composites19
© 2010
DEMO
MSDN TechTalk - SharePoint 2010 Composites
SharePoint Designer
20
© 2010
SharePoint Workflow with Visual Studio 2010
MSDN TechTalk - SharePoint 2010 Composites
Only Farm Solution
WorkFlows: Sequential State Machine
Type: Site List
21
© 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
© 2010
SharePoint Activity for SharePoint Designer 2010
MSDN TechTalk - SharePoint 2010 Composites23
© 2010
SharePoint Activity for SharePoint Designer 2010
MSDN TechTalk - SharePoint 2010 Composites24
.actions File
© 2010
SharePoint Activity for SharePoint Designer 2010
MSDN TechTalk - SharePoint 2010 Composites25
Web.Config
© 2010
SharePoint Activity for SharePoint Designer 2010
MSDN TechTalk - SharePoint 2010 Composites26
© 2010
SharePoint Activity for SPD 2010 - IE
MSDN TechTalk - SharePoint 2010 Composites27
© 2010
SharePoint Activity for SPD 2010 - Visio
MSDN TechTalk - SharePoint 2010 Composites28
© 2010
Demo
MSDN TechTalk - SharePoint 2010 Composites
Custom Action
29
© 2010MSDN TechTalk - SharePoint 2010 Composites
Agenda
Data are always part of the game.
SharePoint & WF
SharePoint & External Data
SharePoint & Silverlight on the Client
30
© 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
© 2010
SharePoint 2010 – External Data
Again – We have different Tools
MSDN TechTalk - SharePoint 2010 Composites32
© 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
© 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
© 2010
SharePoint Designer
Connecting to an externaldatasource – Just a fewclicks to go…
MSDN TechTalk - SharePoint 2010 Composites35
© 2010
Visual Studio 2010 Support
The tool for creating “.NET Connectors”
MSDN TechTalk - SharePoint 2010 Composites36
© 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
© 2010MSDN TechTalk - SharePoint 2010 Composites38
Demo
External List – Visual Studio
© 2010MSDN TechTalk - SharePoint 2010 Composites
Agenda
Data are always part of the game.
SharePoint & WF
SharePoint & External Data
SharePoint & Silverlight on the Client
39
© 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
© 2010
Client Object Model
MSDN TechTalk - SharePoint 2010 Composites41
© 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
© 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
© 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
© 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
© 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
© 2010MSDN TechTalk - SharePoint 2010 Composites47
Demo
SharePoint & Silverlight
© 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
www.trivadis.com
Basel Bern Lausanne Zurich Düsseldorf Frankfurt/M. Freiburg i. Br. Hamburg Munich Stuttgart Vienna
Thank you!