First impressions from WCF

time to read 3 min | 475 words

About a year ago, I sat on a WCF lecture in a user group. That was about 1.5 hours WCF (then still called Indigo) that lasted for a long time. I almost explicitly avoided learning anything about the WinFX set of technologies. They had no relation to my current projects, and I had enough on my table as it was. This has changed recently, especially since the RTM of .Net 3.0

I am now learning about WCF, and I thought that I would detail what I think about it as I got along.

Before even starting, I feel that I must point out something. Just about everyone that I talk to feel the need to point out that you can modify the service binding without touching the code. For me, this is a major non-issue. I took a brief look at the WCF configuration files, and I started to develop a severe case of Xmlitis. Beyond this, I am not impressed with changing the configuration to completely change the actions of the code. It is very basic stuff. [And no, I am not attacking WCF for this, I just annoyed by people who feel the need to point this as a major advantage.]

 After learning a bit about the way WCF works, I can say that this is an illusion, while you configure much in the config file, there are quite a bit of implication of those configuration that any real service would have a fairly static configuration by its very nature. Just looking at the feature matrix of each protocol and comparing it to the things I need can lock me to a specific mode of operation.

This gets really interesting when you consider a simple case of throwing an exception from a service, and all the ways that the protocol, binding etc will affect it, will it break the channel or not, can the client know about it or not, what happens if a callback it used and it throws exception when called from within the service operation method. There are answers to all of the above, but they goes like this:

If Net TCP is used, then…, If Http Dual is used, then…

I wonder how big is the full feature matrix (and in how many dimentions it needs to be). WCF is huge in the number of paraemters that you can play with, and the number of combinations and possiblities that you end up with.

What I find interesting is that WCF is very similar (conceptually) to the way an IoC container work, in fact, I can probably draw direct correlations between Windsor and WCF in many areas.