D'Arcy from Winnipeg
Solution Architecture, Business & Entrepreneurship, Microsoft, and Adoption

Dev Teach Day 3 - Rob Windsor: Intro to Windows Communication Foundation

Wednesday, November 28, 2007 6:41 AM

I heart Rob Windsor...I must say that up front. Rob is a class guy and I'm really looking forward to him stroking my cereberal cortex with WCF goodness.

WCF Basics

Service Contract
Defined by an interface type,a nd attributes are used to indicate the methods that will be included in the service topic.

Service Class
Regular class with no inheritance requirements and implements the service contract interface.

Service Host
Services hosted in any application, as well as IIS.

Service Client
Consumes operations via a proxy, which can be created transparently by WCF given a contract, using the svcutil command line util, or using the Add Service Reference dialog in Visual Studio

WCF - End Points
Client passes messages (SOAP/XML) to a service via endpoints.

OK, so here's where its making more sense: WCF allows you to create a service, written once, which allows for various endpoints that can handle multiple protocols.

ABC - Address (Where) Binding (How) Contract (Where)

Out of the box bindings include TCP, P2P, IPC, HTTP/HTTPS (various flavors), and MSMQ.

One feature is an easy way to change your service via config settings (i.e. making an HTTP protocol endpoint HTTPS instead), and it abstracts a bulk of plumbing.

Rob just used the example of "What if you have to send coordinates for where you're going to attack next in a military operation? You probably want security over performance." I'd ask the tank driver that has resurgents rushing him with rocks, malatoff cocktails, and a hand-held grenade launcher. ;)

Hosting this in ASP.NET

Where can I put my service code?
Anywhere where you can put code in ASP.NET

Rob suggests still writing them in assemblies though (so that you're not tied to an ASP.NET/IIS model).

You can ONLY use HTTP bindings when hosting a WCF service in ASP.NET.

Summary

WCF is MS's next gen platform for distributed systems
Not as simple as easy as web services, but more powerful.

My Take

WCF to me sounds like Web Services 2.0. Instead of being hindered with a web-service based implementation for a service you want shared across multiple applications, now you can expand your service to be available over TCP, or MSMQ, or another type of protocol without having to re-write your service to a particular communication method. That is kewl, but it doesn't mean that you'll be using this in EVERY project. It's one of those things where you need to ensure you're using the right tool for the job. Very kewl though.

Great job Rob!

D




Feedback

# re: Dev Teach Day 3 - Rob Windsor: Intro to Windows Communication Foundation

I liked your site. 9/29/2009 2:43 AM | Rob

Post a comment