Download presentation
Presentation is loading. Please wait.
1
Shani Raba Team Leader & Software Architect http://www.human-debugger.net
2
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
4
Still need to solve Technology & Platform Transactions Communication (Protocols & patterns) Versioning
6
We will talk in a minute
7
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
8
What is a Service (or web service)? Some functionality exposed via a structured messaging scheme
9
Focus: messages sent and received Moves from a Client/Server model to a Sender/Receiver model Rich communication patterns and functionality Big Win – versioning independence
10
One-way (datagram) Message send, no response Request / Reply from the same receiver Message send with one reply Sender Receiver Sender Receiver Duplex Sender and Receiver can exchange multiple messages Sender Receiver
11
Sender Receiver Intermediary Invisible to the sender, promises to not materially change the message A received message triggers a send to another service Request / Reply from another Receiver Message sent, one or more replies from a receiver other than the original recipient Sender ReceiverIntermediary Sender Receiver
12
Peer To Peer (P2P) A mesh of partially connected nodes Can scale to infinite size Cool to think about, traditionally hard to do ABC D E
13
One-stop-shop for services Consistent object model Great features 1 st released with.NET Framework 3.0 Vista, WinSrvr 2003, Win XP SP2 Focus on the functionality, WCF takes care of the plumbing
15
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
17
.NET Fx 3.0 / 3.5 Runtime Components Windows Software Development Kit Includes C++ compilers, FxCop, Debugging Tools for Windows and WCF, and Documentation VS 2005 or VS 2008 VS 2008 has more advanced tooling support
20
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
21
Sender Endpoint Sender and the Receiver expose Endpoint(s) Receiver Meta Endpoint CB A C BA Endpoint CB A WCF ’ s ABC – Address(Where) Binding(How) & Contract(What)
22
The unit of communication The ABC of WCF Address – where to expose Binding – how to expose Contract – what to expose Defined in code or in configuration Service CBA CBA A BC CBA
24
Receiver: Uri Scheme important (net.tcp, http, net.msmq, etc.) Sender: EndpointAddress URI + WS-Addressing info
25
Transport, protocol, and encoding options Transports: TCP, NamedPipes, HTTP, Peer- To-Peer, and MSMQ Protocols: WS-ReliableMessaging, WS- AtomicTransaction, WS-Security, etc Encodings (format): Binary, MTOM, and Text Even more… Customizations are easy
27
Binding Name Transport Encoding Interop Security Session Transaction Duplex Streaming BasicHttpBindingHTTP/SText.MTOMBP 1.1 TX WsHttpBindingHTTP/SText.MTOMWST | SXXX WsDualHttpBindingHTTP/SText.MTOMWST | SXXXX NetTcpBindingTCPBinary.NETT | SXXXX NetNamedPipesBindingIPCBinary.NETT | SXXXX NetMsmqBindingMSMQBinary.NETT | SX NetPeerTcpBindingP2PBinary.NETT | SX MsmqIntegrationBindingMSMQBinaryMSMQ TX
29
Define the shape of the service & messages DataContracts Message ServiceContracts Operations [ServiceContract] internal interface ISomeContract { [OperationContract(Name=“Op1”)] Message Op1(Message msg); [OperationContract(Name=“Op2”)] Int32 Op2(Widget widget); } [DataContract] internal sealed class Widget { [DataMember(Order=1)] private String Name; [DataMember(Order=2)] private String Description; [DataMember(Order=3)] private Int32 Identifier; }
30
Define the shape of the service & messages DataContracts Message ServiceContracts Operations Service Contract Operations Behaviors communication shapes method signature Data Contract Parameters of data Scheme Versioning Strategy
33
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
34
Any process that can load an AppDomain can host an endpoint Each has ramifications (startup, monitoring, etc.) System.ServiceModel.ServiceHost central in hosting endpoints NOTE: Hosting model is completely disconnected from the ASP.NET pipeline (unlike ASMX and WSE)
35
Each app domain can have zero or more service host instances each service host instance is dedicated to a particular service type
36
Addresses, Bindings, and contracts can be setup imperatively or in a configuration file web.config or.exe.config Which one: config or imperative Tough question, depends on preference and requirements
38
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
41
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
45
Brief History Definitions Quick-start WCF Basics (ABC) WCF Basics (Hosting) WCF Tools Let’s Code… More on Architecture
46
Bindings Bindings configure the Channel Layer Easy to use, pluggable, extensible, big part of the universal OM Channels Channels do the actual work of messaging Channel layer tasks include WS-* choreographies, MEPs, encodings, and security Contracts Contracts define services and message schemas Contracts simplify the development experience Behaviors Behaviors impact local processing
47
Managing the instance Involving Transactions in code How does WCF work? How do I extend WCF? How do I control the threading model? …
48
Receiver Channels Sender Proxy Sender App Dispatcher Receiver App Channel Layer ServiceModel Layer Channels
49
Summary What is a service? What the hell is ABC? Which Hosts we have? What is fault? Name Binding Types
50
Related Resources (You are not alone out there) WCF Sites http://netfx3.com/content/WCFHome.aspx http://www.roadtowinfx.com/ IDesign http://www.idesign.net/idesign/DesktopDefault.aspx?tabid=5&tabinde x=3 Microsoft.net Frameworks http://msdn2.microsoft.com/en-us/netframework/default.aspx Bloggers http://blogs.msdn.com/windowssdk/ http://blogs.msdn.com/wenlong/archive/2006/01/23/516041.aspx http://www.dasblonde.net/ Israeli Bloggers http://weblogs.asp.net/israelio http://wortzel.blogspot.com/ http://www.lnbogen.com
51
Related Resources (You are not alone out there) On my Book Shelf Programming WCF Services Microsoft® Windows® Communication Foundation Hands-on! Inside Microsoft Windows Communication Foundation Programming “Indigo”
53
Shani’s contact information Blog: http://www.human-debugger.nethttp://www.human-debugger.net E-mail: rabashani@gmail.comrabashani@gmail.com Thank you Nati’s contact information Blog: http://blogs.microsoft.co.il/blogs/ndobkinhttp://blogs.microsoft.co.il/blogs/ndobkin E-mail: ndobkin@gmail.comndobkin@gmail.com
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.