Windows Communication FoundationStipe Ivan Latković
Me, myself and I
• FESB• PhD• Service-oriented online monitor
• DUMP• Interests
• SOA• OOAD• etc.
How we got here
1980s
Object-oriented
Polymorphism
Encapsulation
Subclassing199
0s
Component-based
Interfaces
Dynamic loading
Runtime metadata
2000s
Service-oriented
Messages
Schema + contract
Binding via policy
A unified programming model
?!
ASMX
WSE
MSMQRemoting
COM+ (Enterprise services)
The challenge
...to radically simplify distributed application development
The response
WCF vs ASMX
Clients and services
SOAP message
Endpoints
Client
Endpoint
Service
Endpoint
A B C A B CA A
Where?
B BC C
How?What?
Bindings
Protocol, reliability, encoding, security, ...
PRES+
Out of the box bindings
• BasicHttpBinding• WSHttpBinding• WS2007HttpBinding• WSDualHttpBinding• WSFederationHttp
Binding• WS2007FederationHttp
Binding
• NetTcpBinding• NetNamedPipeBinding• NetMsmqBinding• NetPeerTcpBinding• WebHttpBinding• MsmqIntegrationBinding
Address
[transport]://[server name]:[port]/[ep path]
http://localhost:50000net.tcp://localhost:50000/MyService
net.pipe://localhost/MyPipenet.msmq://localhost/MyService
Contracts
Service contract
The functio-
nality
Data contract
Complex data types
Message contract
Control over the
SOAP messages
Message exchange patterns
One-wayRequest-replyDuplex
Metadata exchange
Security
• Claims based end-to-end security• X509, Username/Password, Kerberos, custom
credentials...• Message security
• Confidentiality and integrity• Transport or message level
• Access to resources• Authentication and authorization
Reliability and transactions
• End-to-end reliable messaging• In-order guarantees• Exactly once guarantees
• Transactions• Guaranteed atomic success or failure across
boundaries
Hosting
• IIS6• HTTP only
• WAS (Windows Activation Service)• Can use any transport• Supported in IIS7
• Self hosting• Can use any transport• Console & WPF apps, Windows services, etc.
WCF tools
• WCF Configuration Editor
• WCF Service Host
• WCF Test Client
• SvcUtil
• SvcTraceViewer
Recommended books
Giveaway
Thnx!