Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF as a web service with the smallest possible payload
    text
    copied!<p>I do most of my work with Microsoft technologies these days, so naturally I'm checking out what WCF has to offer. It seems very flexible and a great next step up from .Net remoting, but it seems very tied to SOAP messages and quite a bit clunky for a platform agnostic web service app. I'm not an expert on the technology, but I imagine all of this flexibility they're touting means that you can break away from SOAP messages and return whatever data structures/format you want. Is this true or false?</p> <p>The reason I say this is that if I really wanted to create an application as a REST service, one of my target platforms would be mobile. Not just that, one important goal of any web based service is to keep the data payload small whether for a mobile at dial up speeds or a full desktop app.</p> <p>So, if you take Twitter's api as an example, it has been incredibly successful because you can request the data as JSON with no fancy SOAP envelopes weighing the data down and receive the smallest amount of bytes to represent the data you want. So a mobile application running on a device with poor connectivity consuming Twitter's data can use the least amount of bandwidth possible. Besides that, the pattern of Twitter, Facebook, or any of the more successful public api's is a custom data structure in JSON and/or XML and not wrapped in a SOAP envelope (though I could be wrong...this is just my impression).</p> <p>How would you do this in WCF? Do you have to jump through hoops to tell WCF to "just return this text...don't worry about the SOAP envelope", or is it a simple config option?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload