Aaron Skonnard Cofounder Pluralsight SOA201 About Aaron Skonnard Cofounder of Pluralsight Industry think-tank focused on developer training Recently released Pluralsight On-Demand! Active in the community Microsoft MVP for.

Download Report

Transcript Aaron Skonnard Cofounder Pluralsight SOA201 About Aaron Skonnard Cofounder of Pluralsight Industry think-tank focused on developer training Recently released Pluralsight On-Demand! Active in the community Microsoft MVP for.

Aaron Skonnard
Cofounder
Pluralsight
SOA201
About Aaron Skonnard
Cofounder of Pluralsight
Industry think-tank focused on developer training
Recently released Pluralsight On-Demand!
Active in the community
Microsoft MVP for Connected Systems
Author & 10-year columnist for MSDN Magazine
Contact information
Email: [email protected]
Blog: http://pluralsight.com/aaron
Twitter: http://twitter.com/skonnard
WCF & WF 4.0
Primary focus on bringing WCF + WF together
WCF 4.0
WF 4.0
Simplifies developer experience
Major shift in direction
Enables new scenarios/features
Redesign of WF runtime and
programming model
Fairly minor in terms of impact
to your applications
Likely to break today's apps
New WCF 4.0 Features
Simplified configuration
Discovery
Router service
Improved REST support
Misc. advanced features
Simplified Configuration
New support for default service configurations
Default binding & behavior configurations
Implicit endpoint configurations
Much easier to get services up and running
Removes the need for <service> configuration
Also enables file-less activation (no .svc)
Service Discovery
WCF 4.0 provides two types of service discovery
Adhoc
Clients can discover
services on a local
subnet (UDP-based)
Managed
Clients can discover
services on a larger
"managed" network
(beyond the local
subnet) through a
discovery proxy
Enabled via the serviceDiscovery behavior,
clients "discover" services using a DynamicEndpoint
New WCF 4.0 Features – Part I
Router Service
First-class "router" service
Content-based routing, protocol bridging, etc
Error handling support
You host it like any other WCF service
Configure with routing "filters"
Service
Client
Router
"filters"
Service
Improved REST Support
Many features from the WCF REST Starter Kit
will become part of WCF 4.0
Automatic
help page
HTTP caching
support
?
New WCF 4.0 Features – Part II
Advanced WCF Features
DataContractResolver for type resolution
Allows you to override known type resolution
Support for queues with competing consumers
Added a "receive context" feature
High-performance ETW-based tracing
Blob encoder
WF 3.x Challenges Today
Limited support for XAML-only workflows
Versioning is problematic
Limited base activity library
Writing custom activities is hard
Managing data flow is really hard
Moving Towards WF 4.0
Major themes in WF 4.0 include…
XAML-only model
Enhanced base
activity library
Simplifying
data flow
Simplifying
custom activities
Runtime/designer
improvements
XAML-only Workflows
A declarative workflow is fully described within
a XAML file (no code-behind)
Has always been the ultimate WF vision
Possible in .NET 3.x but not easy
.NET 4.0 makes them first-class citizens
Enhancements to programming model remove the
need for code-behind files altogether
Full designer support in Visual Studio 2010
Benefits of Declarative Workflows
The program definition is just data
Visio
DSL
C#
It's typically an XML file that's easy to process
Simplifies tool support and designers
It can be stored anywhere (file, DB, cloud, etc.)
It can be represented in different formats
XAML, C#, Visio, custom DSL, etc.
Increases hosting & deployment flexibility
Extended Base Activity Library
.NET 4.0 comes with several new/enhanced activities
Flow Control
Collection
Others
Flowchart
AddToCollection
Assign
ForEach
RemoveFromCollection
InvokeMethod
Parallel*
ExistsInCollection
Persist
ParallelForEach*
ClearCollection
TryCatch
DoWhile
...
CompensableActivity
Pick
Interop
…
...
Microsoft is planning to ship more activities via CodePlex over time
* New "parallel" behavior
New Flow Chart Model
Flowcharts offer a middle ground between
the sequential and state machine models
Simple step-by-step model,
with decisions and switches
Allows you to return to previous
activities in the workflow
Simplified WF Programming Model
WF 4.0 makes it much easier to:
host workflows and run workflow instances
manage workflow bookmarks
create custom activities
pass data into activities and store data
Creating Custom Activities
New Programming Model for Custom Activities
WorkflowElement
Activity
CodeActivity
NativeActivity
Plus the new DynamicActivity for dynamic activity composition
WF 4.0 Data Flow Constructs
Arguments
Variables
Expressions
Used to define the way data flows in and out of an activity;
each argument has a binding direction:
input, output, or input/output.
Used to declare named storage for data within an activity;
variables can be defined at different scopes within a workflow.
Takes one or more input arguments, performs some operation
on those input arguments, and then returns a value.
Arguments and Variables
Activities define Arguments to declare the type of data
Activities Activities
are the
Activities
primitive
Activities
are composable
have
abstraction
bind
user-defined
Arguments
with
forother
behavior
Variables
toActivities
in-scope
for data
Variables
storage
that can flow into or out of an Activity
Flow Chart
Sequence
Variables
Variables
Parallel
Variables
InArgument<TimeSpan>
OutArgument<Message>
OutArgument<Order>
Generate
Order
Delay
InArgument<Message>
Send
Message
Receive
Message
Process
Order
Send
Report
WF 4.0 Programming Model
WCF Workflow Services
WCF Service
WF Workflow
WCF endpoint
External
Service
Client
WCF endpoint
External
Service
Workflow Services
New messaging activities
Add service reference (Visual Studio)
XAML authoring (contracts, bindings, etc)
Workflow service host
WCF Activities in .NET 4.0
WF 4.0 comes with new-and-improved WCF activities
.NET 3.5
.NET 4.0
Send
Send
Receive
Receive
SendAndReceiveReply
ReceiveAndSendReply
All 4.0 messaging activities come with improved
WCF support including correlation
Message Correlation
When sending and receiving WCF messages,
correlation is a common need
.NET 4.0 adds correlation support to WCF
WF makes correlation easy to use via activities
Workflow Services
The New WF Designer
Improved Designer
Performance
Improved Usability
Major Rehosting
Improvements
Unified Debugging
Experience
WF Runtime Improvements
10-100x Performance
Improvements
Full Control
Over Persistence
Flow-in Transactions
Preparing for WF 4.0
Your 3.x workflows will continue to work
Using the WF 3.0 runtime
You can use 3.x activities in a 4.0 workflow
Use the Interop activity
More guidance coming from Microsoft…
Summary
WCF/WF 4.0 offers many improvements:
WCF + WF integration: Workflow Services
New WCF features & messaging improvements
New WF runtime, programming model, & designer
Lays a solid foundation for building connected
systems on the .NET platform
Additional Resources
WCF and WF Services in the .NET Framework
4.0 and "Dublin"
http://msdn.microsoft.com/enus/magazine/2009.01.net40.aspx
The Workflow Way (new whitepaper)
http://msdn.microsoft.com/wf/future
Screencasts on WCF/WF 4.0:
http://www.pluralsight.com/main/screencasts/
Follow Pluralsight in real-time on Twitter:
http://twitter.com/pluralsight
Related Content
Breakout Sessions
SOA204
The Microsoft Developer Platform for Building Software-Plus-Services
Applications
Mon | 1:00-2:15 PM
ARC201
A Lap around Team System 2010 Architecture Edition
Mon | 2:45-4:00 PM
SOA201
A First Look at WCF and WF in the Microsoft .NET Framework 4
Tue | 8:30-9:45 AM
SOA202
A Lap around Microsoft Code Name "Dublin"
Tue | 2:45-4:00 PM
SOA310
Managing, Tracking, and Troubleshooting Services in "Dublin”
Tue | 4:30-5:45 PM
SOA401
Developing Service Oriented Workflows
Wed | 8:30-9:45 AM
SOA309
Load Balancing and Scaling Your WCF Services Today and Tomorrow
Wed | 4:30-5:45 PM
SOA302
Building RESTful Services Using WCF
Thu | 10:15-11:30 AM
SOA206
Every Class As a Service: WCF As the New Microsoft .NET
Thu | 2:45-4:00 PM
SOA313
StockTrader Sample Application Case Study: Performance and Java Interop
Fri | 10:45-12:00 PM
SOA303
Busy Microsoft .NET Developer's Guide to WCF, SOA, and Success
Fri | 1:00-2:15 PM
Plus… Checkout Interactive theater sessions in the TLC area and hands-on-labs
Track Resources
SOA
www.microsoft.com/soa
msdn.microsoft.com/wcf
msdn.microsoft.com/wf
www.microsoft.com/net
msdn.microsoft.com/biztalk
www.microsoft.com/biztalk
“Dublin”
www.microsoft.com/net/dublin
“Oslo”
msdn.microsoft.com/oslo
www.microsoft.com/net/oslo.aspx
msdn.microsoft.com/azure/netservices
www.microsoft.com/azure/netservices
twitter.com/dotnetservices
Resources
www.microsoft.com/teched
www.microsoft.com/learning
Sessions On-Demand & Community
Microsoft Certification & Training Resources
http://microsoft.com/technet
http://microsoft.com/msdn
Resources for IT Professionals
Resources for Developers
www.microsoft.com/learning
Microsoft Certification and Training Resources
Complete an
evaluation on
CommNet and
enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.