Earlier quoted context omitted.
WCF is passable iff both your sides are .NET - in which case it is an overkill, slow and unneededly complex. If your other endpoint is not .NET, it's all of that and also horribly broken. Have enumerations somewhere? WCF will encode them as integers. Have or need a date/time value in a format that isn't what WCF generates or expects - e.g. JSON Date() expressions? Doable, but error prone, slow and unintuitive (and ..…
I remember so much pain trying to get a .NET WCF and Java SOAP service to work together when they should have been compatible. This is an amusing read: http://harmful.cat-v.org/software/xml/soap/simple :) The UK National Rail API is a WCF SOAP endpoint so I wrote this open source proxy with Web API to make it easier for non-.NET developers more familiar with restful JSON: https://github.com/jpsingleton/Huxley
WCF is Open Source
71–80 of 149 posts
Re: WCF is Open Source
#72Earlier quoted context omitted.
WCF is passable iff both your sides are .NET - in which case it is an overkill, slow and unneededly complex. If your other endpoint is not .NET, it's all of that and also horribly broken. Have enumerations somewhere? WCF will encode them as integers. Have or need a date/time value in a format that isn't what WCF generates or expects - e.g. JSON Date() expressions? Doable, but error prone, slow and unintuitive (and ..…
> Have enumerations somewhere? WCF will encode them as integers. Can you give an example of this? I have never had this problem. > Have or need a date/time value in a format that isn't what WCF generates or expects In my experience this is a data-interchange problem that will always exist. It is not unique to WCF. I do agree that if you are using REST/Json then you should avoid WCF.
But e.g. Enum Direction { East, West, North, South };
Put that as a field in a structure that's sent/received through WCF; on JSON it will encode as numbers, regardless on any annotation you put. On XML iirc too - though I don't remember for sure. Want them as strings? You have to encode/decode yourself. But if you use .NET on both sides , you wouldn't notice unless you sniff the connection - until you change the enumeration order, for example, and all help breaks loose. Which is to be expected of a binary protocol, but completely unexpected for verbose text formats like JSON or XML.
Re: WCF is Open Source
#73Nice. WPF, please
... and VB6
Re: WCF is Open Source
#74Earlier quoted context omitted.
What are some other libraries and frameworks that should be used? (For C# web services)
ASP.NET Web API http://www.asp.net/web-api
https://github.com/faniereynders/WebApiProxy/wiki/WebApi-C%2...
Re: WCF is Open Source
#75I love C# and .NET, but WCF is a true source of frustration. It isn't horribly bad, but there is nothing good about it either. It's too complex, too messy, and too "Microsofty" for lack of a better word. Many layers of abstraction, hidden magic in XML files (which you can of course turn off, but then you need to know how to), and so on. Nevertheless, shares of coders blindly use WCF, "because Microsoft tells us to".…
Re: WCF is Open Source
#76Microsoft fanboy here. But... this product is total shit. Even if you're tasked with some horror like talking to an overdesigned XML backend written in Java nine years ago that uses an alternate canonicalization for digitally-signed XML and requires a slightly-deviant form of SOAP authentication... well, it'll eventually work. The source won't help you. It's the least of your concerns. This is exactly the type of ove…
That and wireshark, and netmon. OK, I need to stop now or the repressed memories will come back. :)
Re: WCF is Open Source
#77Earlier quoted context omitted.
The ServiceStack.Redis client uses pooled ThreadSafe Client Managers by design: https://github.com/ServiceStack/ServiceStack.Redis#redis-cli... Which works very much like a DB Connection, where the Connection Factory is thread-safe (and what's used to resolve connections) whilst the DB Connection instance it returns are not.
Sorry, I know you worked hard on it but this comes from real experience. We had an absolute nightmare debugging strange issues in the cache and traced it to this. Probably an older version though.
Re: WCF is Open Source
#78WCF is broad. Mind-bogglingly broad. I was in a project on we were implementing a P2P system on top of WCF and WCF has some mesh capability built in. Being able to use the same API for HTTP requests feels odd. Once I understood the breadth of what it can do it really lives up to its name. Unfortunately, it wasn't a focused API for most of what people needed it for.
Re: WCF is Open Source
#79Earlier quoted context omitted.
> Have enumerations somewhere? WCF will encode them as integers. Can you give an example of this? I have never had this problem. > Have or need a date/time value in a format that isn't what WCF generates or expects In my experience this is a data-interchange problem that will always exist. It is not unique to WCF. I do agree that if you are using REST/Json then you should avoid WCF.
On phone, can't copy/paste. But e.g. Enum Direction { East, West, North, South }; Put that as a field in a structure that's sent/received through WCF; on JSON it will encode as numbers, regardless on any annotation you put. On XML iirc too - though I don't remember for sure. Want them as strings? You have to encode/decode yourself. But if you use .NET on both sides , you wouldn't notice unless you sniff the connectio…
It serializes correctly.
For JSON you need an appropriate converter but as I said I would not use WCF with JSON.
Re: WCF is Open Source
#80Earlier quoted context omitted.
> And it fails spectacularly. I mean, _it works_, but it's a disaster to work with and write software against. Can you give an example of how it's a disaster? I'm genuinely curious because I've had to use it for at least 5 years (I still support 1 WCF solution) and this was never my experience.
Have you used WCF talking to non-WCF WS-* things, or just WCF to WCF? My experience was that the latter (mostly) just worked but interop was somewhat of a nightmare, making the whole WS-* thing somewhat pointless. It wasn't really WCF's fault; just that no two WS-* implementations actually implemented things identically.