Your SlideShare is downloading. ×
  • Like
Diving Into Services
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Diving Into Services

  • 830 views
Published

WCF Presentation for the St Louis .NET User Group - May 2009

WCF Presentation for the St Louis .NET User Group - May 2009

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • Hey

    thanks for posting this!!! I was at the user's group last month and this was a great presentation you gave.

    tk
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
830
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
35
Comments
1
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Diving Into Services With WCF Chris Deweese
  • 2. Announcements / Contact Chris • Twitter: @cdeweese • Web: http://christopherDeweese.com • From IL? See me about an IL Metro .NET Users Group • St Louis Day of .NET August 28-29 @Ameristar in St Charles
  • 3. Agenda • Part 1 – WCF Basics ▫ What & Why of WCF ▫ Key Concepts ▫ WCF Architecture ▫ ABCs of WCF ▫ Code! And Demo • Part 2 – Advanced WCF ▫ Business Case ▫ Architecture ▫ Code! And Demo
  • 4. What is WCF • Framework for building service-oriented applications • Separates the logic of services from the channels they communicate on • Messages based on Simple Object Access Protocol (SOAP) • Support for REST & Plain-old Xml (POX) as of .NET 3.5
  • 5. Why WCF • Evolution of service oriented thinking • Remoting, Message Queuing, and ASMX were designed on different stacks • WCF unifies the programming model for exposing services through different channels (Web, Message Queues, TCP) ▫ Service logic and function is not dependent on the channel or transport
  • 6. Key WCF Concepts • Service – Unit of work exposed to the world. • Endpoint – the collection of the services address, binding, and contract. • Binding – How you interact with the service at the wire level. • Channel – Picks the message up from the wire format and brings it into the WCF stack. • Dispatcher – Manages execution of service code by routing messages to the appropriate service instance and method. • Behavior – How you can control the local execution of a service.
  • 7. Hosting WCF Services • In Process • Windows Service • Web Service (IIS) • Windows Activation Services ▫ WAS allows you to host a service on any binding
  • 8. WCF Architecture
  • 9. ABC’s of WCF
  • 10. Address • “Dude where’s my service?” • The location of the service on the network where it can be reached. ▫ http://localhost/wantedperson/v1/wanted.svc ▫ net.msmq://localhost/private/wantedpersonv1 ▫ net.tcp://localhost:6000/wantedpersonv1 • Set via configuration or through code
  • 11. Binding • “How do I talk to this thing?” • The protocol and policies used to connect to the service at it’s address. • WCF Provided Bindings ▫ Http(BasicHttp, WsHttp, WsDualHttp, WsFederation) ▫ NetMsmq ▫ MsmqIntegration ▫ NetNamedPipe ▫ NetTcp ▫ NetPeerTcp • Set via configuration or through code
  • 12. Contract • “What’s it going to do for me?” • Defines the operations, inputs, outputs, and message exchange patterns of the service. • 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. • WCF Serialization is “Opt-In”
  • 13. WCF Basics – Demo and Code!
  • 14. Photo by szeke: http://www.flickr.com/photos/pedrosz/
  • 15. Part II: Advanced WCF
  • 16. Concepts Demonstrated • Tracing • Fault Contracts • Multiple Endpoints • Custom Service Host • Custom Service Behavior ▫ Unity Integration for Inversion of Control ▫ Unity Lifetime Manager (Singleton) • Service Instancing Behavior • Enterprise Library Exception Handling Integration
  • 17. WCF Advanced – Demo and Code!
  • 18. Questions?