WCF 4.0 Quickstart<br />Chris Deweese, Consultant, Daugherty Business Solutions<br />
Warning<br />Should I answer my phone and suddenly run out, rest assured knowing it’s because my wife is most likely going...
What is WCF?<br />Windows Communication Foundation<br />Framework for building distributed applications<br />Unified progr...
Why Would I use WCF?<br />Web Services (SOAP & REST)<br />Distributed Communication (Messaging – message queues/sockets)<b...
Key Concepts<br />Service – Unit of work exposed to the world.<br />Endpoint – the collection of the services address, bin...
ABC’s of WCF<br />
Address<br />“Dude where’s my service?”<br />The location of the service on the network where it can be reached.<br />http...
Binding<br />“How do I talk to this thing?”<br />The protocol and policies used to connect to the service at it’s address....
Contract<br />“What’s it going to do for me?”<br />Defines the operations, inputs, outputs, and message exchange patterns ...
Hosting WCF Services<br />In Process<br />Windows Service<br />Web Service (IIS)<br />Windows Activation Services<br />WAS...
WCF Architecture<br />
What’s new in WCF 4?<br />Simplified configuration<br />Simplified configuration<br />Simplified. Configuration.<br />
What else is new in WCF 4?<br />WS-Discovery protocol implementation<br />Used to discover services on the network<br />Ro...
Let’s Build a Service<br />Less talk. More code.<br />Demo: BasicHttp Service<br />
Let’s get some REST<br />Drop the soap.<br />Demo: Add REST endpoint to existing service<br />
Hands-free with Default Endpoints<br />Look Ma’ No Configuration<br />Demo: Hosting BasicHttp, Net.Tcp, and REST in one II...
Where do you want to go today?<br />Routing Service<br />Demo: Sports & Concert ticket services (Created by Richard Serote...
Why WCF 4 is Neat-o<br />Aka “Summary”<br />Simplified configuration through default endpoints<br />Simplified coding mode...
Questions/Discussion<br />
Wcf 4.0 quickstart
Upcoming SlideShare
Loading in …5
×

Wcf 4.0 quickstart

2,626 views
2,522 views

Published on

Presentation delivered at the 2010 Day of .NET, August 20 & 21 at the Ameristar in St. Charles, MO

0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,626
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
134
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Wcf 4.0 quickstart

  1. 1. WCF 4.0 Quickstart<br />Chris Deweese, Consultant, Daugherty Business Solutions<br />
  2. 2.
  3. 3. Warning<br />Should I answer my phone and suddenly run out, rest assured knowing it’s because my wife is most likely going into labor with our 3rd child.<br />Its definitely not because I’m totally unprepared for this and have no idea what I’m talking about.<br />Definitely not that.<br />
  4. 4. What is WCF?<br />Windows Communication Foundation<br />Framework for building distributed applications<br />Unified programming model for different communication channels (web, sockets, message queues, etc)<br />Brings together elements from Remoting, ASMX Web Services, Messaging<br />
  5. 5. Why Would I use WCF?<br />Web Services (SOAP & REST)<br />Distributed Communication (Messaging – message queues/sockets)<br />Intra-process communication (Processes on one machine)<br />
  6. 6. Key Concepts<br />Service – Unit of work exposed to the world.<br />Endpoint – the collection of the services address, binding, and contract.<br />Address – The network location of the service(e.g., http://localhost/home/home.svc)<br />Binding – How you interact with the service at the wire level.<br />Channel – The transport mechanism that moves the message between service and client.<br />Dispatcher – Manages execution of service code by routing messages to the appropriate service instance and method.<br />Behavior – How you control the local execution of a service.<br />
  7. 7. ABC’s of WCF<br />
  8. 8. Address<br />“Dude where’s my service?”<br />The location of the service on the network where it can be reached.<br />http://localhost/pizza.svc<br />net.msmq://localhost/private/pizzaservice<br />net.tcp://localhost:6000/pizzaservice<br />Set via configuration or through code<br />
  9. 9. Binding<br />“How do I talk to this thing?”<br />The protocol and policies used to connect to the service at it’s address.<br />WCF Provided Bindings<br />Http(BasicHttp, WsHttp, WsDualHttp, WsFederation)<br />NetMsmq<br />MsmqIntegration<br />NetNamedPipe<br />NetTcp<br />NetPeerTcp<br />Set via configuration or through code<br />
  10. 10. Contract<br />“What’s it going to do for me?”<br />Defines the operations, inputs, outputs, and message exchange patterns of the service.<br />Defined using an Interface; wired into WCF by using the ServiceContract attribute. Methods use the OperationContract attribute. Classes use the DataContract attribute and members use the DataMember attribute.<br />WCF Serialization is “Opt-In”<br />
  11. 11. Hosting WCF Services<br />In Process<br />Windows Service<br />Web Service (IIS)<br />Windows Activation Services<br />WAS allows you to host a service on any binding<br />
  12. 12. WCF Architecture<br />
  13. 13.
  14. 14.
  15. 15. What’s new in WCF 4?<br />Simplified configuration<br />Simplified configuration<br />Simplified. Configuration.<br />
  16. 16. What else is new in WCF 4?<br />WS-Discovery protocol implementation<br />Used to discover services on the network<br />Routing service<br />Used to route messages based on content or other rules you specify<br />REST Improvements<br />Enhancements to simplify REST service development<br />
  17. 17. Let’s Build a Service<br />Less talk. More code.<br />Demo: BasicHttp Service<br />
  18. 18. Let’s get some REST<br />Drop the soap.<br />Demo: Add REST endpoint to existing service<br />
  19. 19. Hands-free with Default Endpoints<br />Look Ma’ No Configuration<br />Demo: Hosting BasicHttp, Net.Tcp, and REST in one IIS Application<br />
  20. 20. Where do you want to go today?<br />Routing Service<br />Demo: Sports & Concert ticket services (Created by Richard Seroterhttp://bit.ly/cdHp7U)<br />
  21. 21. Why WCF 4 is Neat-o<br />Aka “Summary”<br />Simplified configuration through default endpoints<br />Simplified coding model for REST services (uses ASP.NET 4 routing)<br />New features – Discovery & Routing<br />
  22. 22. Questions/Discussion<br />

×