CodeStock 2008 WCF

By CSharpner · August 9, 2008

Today (August 9th, 2008) was the 1st annual CodeStock convention. For a rundown of the events, click here. The 2nd event I attended was an intro to WCF (Windows Communication Foundation). It was presented by James Bender. Here's a quick and dirty synopsis of his talk:

  • WCF puts all kinds of network resources in a "mesh".
  • Visual Studio 2008 (VS2K8) has a WCF project template.
    • The generated .cs files are garbage, just delete them.
    • The generated config is very useful... keep it.
  • Services can be exposed as HTTP, Named Pipes, MSMQ, or TCP chatter.
  • Hosting your services
    • IIS6 - HTTP only.
    • IIS7
      • WAS (Windows Activation Services), to any endpoint.
    • Can be self-hosted (no IIS needed).
    • Windows Service.
    • Windows application.
  • Out of the box...
    • Basic security is provided.
    • Logging - produces a massive amount of data.
    • Tracing - produces a massive amount of data.
    • Communication editor.
    • Test client app.
  • "ABC's" of WCF endpoint:
    • Address
    • Binding (HTTP, TCP, etc...)
    • Contract
      • defines services & I/O expectations.
      • Data Contract (Body of message) - defines the data structures used.
        • Attributes on class members.
      • Message Contract - defines the methods (I think... someone correct me on this).
      • Fault Contract - defines exceptions to be thrown / data to be returned on errors.
        • basically, better exceptions.
  • Channel Stack - As data flows from one end to the other, it can pass through any number of filters that receive the data, process it, and output something, all the way through.
    • Each channel is a software layer that sits in the communication line & receives, processes, and outputs to the next channel.
    • types:
      • Datagram
      • Request Reply
      • Duplex - 2 way
  • Behaviors & Dispatchers
    • Custom - to preprocess messages.
  • Security - lots of built in & easier than prior technologies.
    • 3 modes:
      1. Transport based - secure only over ONE hop.
      2. Message Based - secure over all hops.
      3. ummm... I don't have the 3rd one (sorry).
Those were my quick and dirty notes. I took them for myself, but I posted them anyway, because they could potentially have some use to others.
If you're interested in attending CodeStock 2009, contact http://codestock.org/.