Wcf 4.0 jump start dodn2011

1,096 views
1,009 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,096
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
66
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Wcf 4.0 jump start dodn2011

  1. 1.
  2. 2. WCF 4.0 Jumpstart<br />Chris Deweese, Senior Consultant, Daugherty Business Solutions<br />
  3. 3. What the Documentation Doesn’t Tell you…<br />WCF has been proven to be 100% effective at defending against and repelling<br />Zombie Hordes<br />Creepy Girls in Horror Movies<br />Decepticons<br />Cobra Commander<br />Ninja Attacks<br />Werewolves<br />Sith Lords<br />Goth Kids<br />Gingivitis<br />
  4. 4. What WCF Will Not Do (Attempting these will void your warranty)<br />Solve all your problems<br />Assist in Particle Acceleration<br />Defeat Superheroes<br />Create Skynet<br />Your Chores<br />Make the architect who told you to build an SOA utopia happy (He’ll change his mind about that later and you’ll have to rebuild it)<br />
  5. 5. What is WCF? (The boring textbook version)<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 />
  6. 6. 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 />
  7. 7. Key Concepts<br />Service – Unit of work exposed to the world.<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 />Endpoint – the collection of the services address, binding, and contract.<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 />
  8. 8. Let’s Learn our ABC’S<br />
  9. 9. 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 />
  10. 10. 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 />
  11. 11. 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 />
  12. 12. 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 />
  13. 13. WCF Architecture<br />
  14. 14.
  15. 15.
  16. 16. What’s new in WCF 4?<br />Simplified configuration<br />Simplified configuration<br />Simplified. Configuration.<br />
  17. 17. 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 />
  18. 18. Let’s Build a Service<br />Less talk. More code.<br />Demo: BasicHttp Service<br />
  19. 19. Let’s get some REST<br />Drop the soap.<br />Demo: Add REST endpoint to existing service<br />
  20. 20. Hands-free with Default Endpoints<br />Look Ma’ No Configuration<br />Demo: Hosting BasicHttp, Net.Tcp, and REST in one Application<br />
  21. 21. Where do you want to go today?<br />Routing Service<br />Demo: Sports & Concert ticket services (Created by Richard Seroterhttp://bit.ly/cdHp7U)<br />
  22. 22. 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 />
  23. 23. Questions/Discussion<br />

×