WCF vs WebServices

Jul 8, 2009 at 3:01 AM

This is a question that I'm getting quite a bit.  In the context of a .net Compact Framework application: why would you favor WCF for communication over Web Services?

With .netcf you only get two protocols in WCF anyway (Messaging and WebService), so most likely the WCF methods would be called via web services anyway.  So the communication channel is the same then.

Is there some other advantage to using WCF?

Jul 9, 2009 at 1:13 AM

Primiraly I believe it is a function of the fact that a mobile application may simply be a part of an overall larger set of applications - and it just so happens that it is WCF as apposed to 'old-style' services that are used.

If I was building a 'mobile-only' application that needed services I would most likely still use traditional services - unfortunatly CF just doesnt cut it for doing WCF.

Nov 24, 2009 at 5:38 PM

The truth is that the only WCF bindings supported by mobile clients (today) are those that are compatible with Web References (classic ASMX) as well. So, you are right, you could just use classic Web Reference at the client despite exposing a WCF service endpoint. The main reason the client might use WCF is to keep with a consistent developer experience. Of course, this is not without need for custom tools such as those we produced in the whitepaper.

Nov 24, 2009 at 6:00 PM

Thank you for the reply Michele.

Granted this is very much after the fact, but there is where I ended up.  For all my mobile projects I have stopped using WCF in favor of standard web services.  The main reason was ease of maintenance.  The WCF wrappers were very hard to debug and prone to just stop working -- for no apparent reason.  It was also much harder to train new developers on all of the ins and outs of WCF development.  With WCF you really need a WCF expert on hand to help debug the services.  There are a lot of hidden features in WCF, and I don't care to dive into the internals to figure that out.  With standard web services there is more of a "it just works" attitude. (speaking metaphorically there).