13 ms·
WCF is Open Source
- WDCDev 11y agoWCF was built for the WS-* world, and as such is over-loaded with complexity that is covered up by way way too much abstraction. If you don't need WS-*, use Web API services self hosted with Katana if you need to exchange data between applications/processes instead.
- ghuntley 11y agoRoll your own using Katana? Yeah that'll work but consider just using http://nancyfx.org/ http://nancyfx.org/ or if you need something more structured https://servicestack.net/ https://servicestack.net/ | http://www.asp.net/web-api http://www.asp.net/web-api
- WDCDev 11y agoKatana can host your services for you outside of IIS. You can use Web API and Nancy with it. I am sure someone has figured out how to setup servicestack as well.
- ghuntley 11y agoYep! http://www.asp.net/aspnet/overview/owin-and-katana http://www.asp.net/aspnet/overview/owin-and-katana Katana/OWIN provides a pipeline for hosting .NET web[sites|services] without IIS. This is another direction .NET is heading, no more IIS shackling (if you so choose)
- douche 11y agoUsing the OWIN HttpListener rather than relying on IIS has been a godsend for many of the applications that we develop. IIS simply has too many knobs that users can twiddle and break our applications. Running a webserver out of a Windows service, with everything sandboxed and tuned to the needs of our application is much simpler. Plus, no need to rely on Powershell scripts, or god forbid, the user, to get the correct set of IIS features installed has made deployment of our apps infinitely simpler.
- ghuntley 11y agoYep, agreed. If you are self-hosting as windows services make sure you check out http://topshelf-project.com/ http://topshelf-project.com/
- anton_gogolev 11y agoOh, don't get me started on this whole Katana/OWIN disaster. Just look at all these dependencies that are required to self-host ASP.NET application. How they managed to complicate things so much -- I don't know. NancyFX all the way.
- WDCDev 11y agoYeah I am not so sure I would serve content using Katana. I am using it to horizontally scale out data services used by clients around the world, hosted in Azure. It's simple to deploy and manage. I also don't have to mess with IIS, which is always a plus given how few admin resources we have to maintain our environment.
- jammycakes 11y agoOne point to note here: OWIN and Katana are two separate components. OWIN is the community-driven underlying abstraction layer which doesn't specify any dependencies; Katana is a Microsoft-driven library of statically typed wrappers around it that completely abstracts it out altogether and leaves you with a bunch of tutorials and blog posts that don't look anything even remotely like the OWIN spec. It's all very confusing. I wrote a blog post about it a while ago trying to untangle the difference between the two in some detail: http://jamesmckay.net/2014/08/sorting-out-the-confusion-that-is-owin-katana-and-iappbuilder/ http://jamesmckay.net/2014/08/sorting-out-the-confusion-that...
- sudioStudio64 11y agoI've always been interested in WCF. This a good thing for those companies that have lots of WCF services. That being said...Scott Hanselman calls it WS-Death Star for a reason. (WS-*, heh. Nerd Jokes. Check.) Hopefully this kick starts the same kind of rapid evolution that Asp.net MVC had after it was open sourced.
- apalmer 11y agoUnlikely... A lot of the complexity is baked into the WS standards of which WCF is only an implementation. So until new standards are rolled out there is a limit to how much clean up can happen. Then the other thing is the fundamental concept of WCF requires a lot of inherent complexity. There is still a good amount of complex for complex's sake that could be cleaned up so hopefully that happens. But its been said WCF is pretty much dead so not sure how much effort will go into it.
- sudioStudio64 11y agoA lot of places out there have some very large numbers of WCF endpoints doing production work. I'm not sure how dead it really is. I know REST/JSON is the new hotness, but there is a bunch of that stuff out there.
- anton_gogolev 11y ago> This a good thing for those companies that have lots of WCF services. I very much doubt that. WCF is one of the most over-engineered frameworks I've encountered so far, and I've seen many. It's an epitome of enterprisiness, with every miniscule detail configurable via XML, with countless layers of abstractions, factories and providers, with very specific modalities, with all kinds of pluggable serializers, with metric ton of other crap. Because WS-*. So it's very unlikely that some average developer will go spelunking through the codebase to fix some obscure bug that occurs when interoperating with an Apache Axis-based Java web service that is using WS-ReliableMessaging with WS-Addressing over carrier pidgeons. Not gonna happen.
- sudioStudio64 11y ago
- unwind 11y agoAs a .Net outsider, it's not very inclusive of them to have an acronym in the title like that. I had to look down on the page to figure out that it means "Windows Communication Foundation". It was not easy to quickly figure out what this actually means, but I guess that's since it's highly technical and I'm not immersed in the Microsoft/.Net talk.
- vdnkh 11y agoI feel like MS is pretty good with their acronyms. Usually just Windows% or Microsoft%. OSS, on the other hand, is a bit ridiculous. It's time [to] explain the meaning of "Hurd". "Hurd" stands for "Hird of Unix-Replacing Daemons". And, then, "Hird" stands for "Hurd of Interfaces Representing Depth". We have here, to my knowledge, the first software to be named by a pair of mutually recursive acronyms.
- bad_user 11y agoHurd isn't ridiculous, I find it to be pretty cool and memorable. The only problem is that the definition isn't tail recursive.
- atlantic 11y agoJudging by the tone of some of the comments so far, and in keeping with the spirit of the times, maybe we should include a trigger warning in the title of any Microsoft-related news.
- omgtehlion 11y agoNice. WPF, please
- Vitallium 11y agoCorrect me if I'm wrong but Microsoft is not planning to make WPF and Windows Forms Open Source.
- sudioStudio64 11y agoThat's the line so far...who knows about the future...
- ygra 11y agoBoth are probably too entangled with Windows internals. Windows Forms is essentially a wrapper around native GDI controls. WPF's rendering system is quite intertwined with the DWM It's much easier to open-source the things with fewer dependencies, such as .NET Core, ASP.NET and other networking stuff. It's also invariably what customers are likely to want to run on Azure (or elsewhere), just maybe not with Windows underneath it. For WPF I'm content with MS actually continuing development. WPF is the best UI framework I've used so far with a lot of good ideas that have sadly been ignored by most others. It's just sad that it got so little attention in recent years.
- acemarke 11y agoEntirely true. Still, seems like if they were to open-source WPF, the Mono community would have an interest in trying to abstract out the DirectX dependencies and making it run on OpenGL. Shame we'll probably never see it happen - it would be great to see a true cross-platform GUI toolkit for .NET that's not GTK.
- achr2 11y agoI use WPF everyday and it has many great features. But sadly it was conceptualized before many of the 'modern' and best features of .net. The striking lack of type support (generics), and frankly broken separation between form and function, makes it feel very clunky at times. Not to mention that while data-binding is first class, the predominant MVVM pattern is sadly bolted on. My last gripe is that in most WPF applications, the only reason the application hangs is due to rendering performance - which is truly unacceptable given every other part of my application can be multi-threaded or async.
- ghuntley 11y agoOn the topic of open-source check out https://github.com/quozd/awesome-dotnet https://github.com/quozd/awesome-dotnet which is a collection of awesome open-source libraries, tools, frameworks and software for .NET.
- runfaster2000 11y agoHere's another one: https://github.com/Microsoft/dotnet/blob/master/dotnet-developer-projects.md https://github.com/Microsoft/dotnet/blob/master/dotnet-devel...
- iandanforth 11y agoDear fellow nerds, please write out all acronyms the first time you use them (TFTYUT), our nerd circles may not overlap. After TFTYUT you can use the nice short version however you wish. Many thanks.
- mhurron 11y agowww.google.com
- simi_ 11y agoJust checked it out, looks neat!
- jxf 11y ago> please write out all acronyms the first time you use them Like any other writing, it's just about knowing your audience. I mean, are you really going to write "HN (Hacker News)", "YC (Y Combinator)", "HTTP (Hyper-Text Transfer Protocol)", etc. every single time you use those in a comment here?
- strommen 11y agoOh come on. WCF is pretty obscure. .NET is pretty unknown to many HN readers, and even within .NET WCF is not very widely used.
- deleted 11y ago[deleted]
- bunderbunder 11y agoBits of every domain are obscure to someone. But it seems to me that the only domain for which use of acronyms in article titles ever seems to provoke this level of irritation is Microsoft's. Makes me suspect that this particular debate is really just a proxy for a different argument altogether.
- iamthepieman 11y agoThe first time I had to consume WS- services in .NET, with deeply nested data types I spent a week trying to figure out WCF and the WS endpoint (which was written in Java) and gave up. I wrote a DSL to parse the messages and just stripped the message off the network stack before it even hit the application level where WCF would handle it. It gives me shivers just thinking about it.
- silverbax88 11y agoWCF is ridiculously complex, has poor testing options and troubleshooting deep issues basically requires turning on logging and loading a massive data dump into a reader just to get some kind of generic error.
- ilitirit 11y agoWhy did you go all the way down to that level? If you could not generate the .NET types from the WSDL (WCF provides tools to do this), you could modify the message using WCF itself. No reason to use a DSL. https://msdn.microsoft.com/en-us/library/aa717047%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/aa717047%28v=vs.110...
- iamthepieman 11y agoBecause I was frustrated and could not figure out how Microsoft wanted the framework to be used. I was new to both WS and WCF at the time. getting WCF configuration working seemed more like a voodoo incantation than any other programming I've ever done. And no I could not get .NET to generate types from the WSDL and I knew about the tools provided for that. They didn't work and I wasted a lot of time on them because everything I read said they should work. I used a DSL because that's what I knew and because I had already wasted too much time. I've since learned to avoid situations like this but that's a whole 'nother comment.
- strommen 11y agoWCF is great if you want to make a single data service available as JSON via REST, XML via SOAP, a custom binary protocol via raw TCP, and who-knows-what else. In practice you're almost always better off just picking a single format for your endpoint, in which case there's no reason to use WCF.
- scuba7183 11y agoWhat are some other libraries and frameworks that should be used? (For C# web services)
- arethuza 11y agoASP.NET Web API http://www.asp.net/web-api http://www.asp.net/web-api
- partisan 11y agoThere is also a proxy generator for Web API so you still keep some of the benefits of WCF. https://github.com/faniereynders/WebApiProxy/wiki/WebApi-C%23-Proxy-Generator https://github.com/faniereynders/WebApiProxy/wiki/WebApi-C%2...
- Roonerelli 11y agofor web services Nancy http://nancyfx.org/ http://nancyfx.org/ service stack https://servicestack.net/ https://servicestack.net/ Asp.net web api http://www.asp.net/web-api http://www.asp.net/web-api
- ilitirit 11y agoWorth considering: https://msdn.microsoft.com/en-us/library/jj823172%28v=vs.110%29.aspx https://msdn.microsoft.com/en-us/library/jj823172%28v=vs.110... My personal opinion is if you want to use an MS technology, use Web API unless you have a compelling reason to use WCF.
- xeromal 11y agoWeb API is the easiest thing you can use. I switching from desktop programming to web and creating restful services in web api allowed me to do a lot with little and also teach me a thing or two about REST. I highly recommend it.
- Roonerelli 11y agoWCF made the mistake of trying to be all the things to all the people The abstraction is simply broken It tried to be a common abstraction over http, tcp, message queue etc. Which is just not possible There's too many specifics in each of them to have any sort of common interface (in all but the most simple examples)
- Yuioup 11y agoMaybe now is the chance to fix it?
- plorkyeran 11y agoYou can't meaningfully fix something when the problem is that the core concept is flawed.
- snarfy 11y ago10% coding, 90% XML configuration.
- kabdib 11y ago... and nearly 100% impervious to debugging. Which is what you want in a communications library. But WCF is pretty hermetic when Bad Shit happens (and it will).
- skrebbel 11y agoI 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". Bullshit, and what a waste. There are very few modern use cases where WCF is the best option out there. If you want to make a RESTful API with .NET, please consider: * ASP.NET MVC Web API * ServiceStack * Nancy Nancy is basically Ruby's Sinatra but then on .NET. ServiceStack recently became commercial, but it still is the best designed API library I've ever seen, in any language. It makes you focus more on the actual data inside each request and response, and less on the form of that data (is it a query parameter, JSON POST field, or part of a fancy URL? who cares, design your messages first and then figure out what the URLs should look like). The result of this is that somehow you tend to automatically design forward-compatible, extensible API endpoints. I guess you really have to feel it to believe it, but I kid you not, with ServiceStack, it feels like your API designs itself in front of your eyes. If anyone knows anything like ServiceStack on any other language, please tell me and I'm going to give you hugs. Finally, MVC Web API is basically Rails's API controllers ported to C#. It has a tad too much magic for my taste, but it's a familiar and decent pattern that just works. Please, please, let's just bury WCF and embrace the true goodies in the .NET open source ecosystem. It's nice that WCF got open sourced, but it's still a mess. If you really must go the "because Microsoft!" route, please just use ASP.NET MVC (also open source, and in active development).
- ilitirit 11y agoIt's worth remembering that the technologies you mentioned weren't around when WCF was created. As far as I can tell, Microsoft doesn't really push WCF any more simply because the use-cases are fewer and/or irrelevant in the current Web Service landscape. I also get the feeling that many people commenting here didn't need to work with WS-* and associated technologies at the time WCF didn't exist. After its release it really was a choice between the lesser of two evils. But at the time, WCF was the mischievous kid who didn't do his homework, and everything else was the direct spawn of Satan. A reminder of what WCF is (Wikipedia): > a runtime and a set of APIs in the .NET Framework for building connected, service-oriented applications > WCF is a tool often used to implement and deploy a service-oriented architecture (SOA) For people who were around during the SOA dark ages, I won't be surprised if reading that sent shivers down your spine. Thankfully SOA, as it was evangelized, is pretty much dead. For everything else, these days better data-interchange technologies exist.
- tacos 11y agoMicrosoft 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 overdesigned schlock that Microsoft occasionally emits then gets stuck supporting because two big corporate clients signed on after two junior devs watched an MSDN talk with the nutjob who architected it. Avoid it.
- ilitirit 11y ago> 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 I think you've found your problem. I'm pretty sure everyone has had to deal with alien legacy systems at some point in their lives. It just goes with the territory. I have yet to come across a technology to that can handle all exceptions and edge cases.
- jsingleton 11y agoI've been there and this tool is invaluable: http://www.soapui.org/ http://www.soapui.org/ That and wireshark, and netmon. OK, I need to stop now or the repressed memories will come back. :)
- ilitirit 11y agoSadly, even SOAP UI can't solve all your problems. WS-* is just so complex that it's rare to find two sufficiently compatible implementations. For example, on one WCF service I capture the message as it arrives and then write to disk. If I replay this message through SOAP UI, it fails unless I modify some of the headers. WS-* just sucks in general.
- jsingleton 11y agoOh it doesn't make it easy! It just gives you a chance.
- insulanian 11y ago"Windows Complication Foundation" is how we called it in my team :)
- Glide 11y agoWCF is very powerful and a piece of frustration. What's interesting is that most people have shared the common use of WCF which is interacting with Web Services and being JSON endpoints. There are better alternatives to make JSON endpoints in .NET. If you're using Web Services you're kind of stuck. So for a lot of people this is going to be useful. WCF 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.
- kabdib 11y ago"Over-designed and under-implemented" WCF is one of Microsoft's many examples of this principle. Avoid this, the solution hurts more than the problem.
- daigoba66 11y agoA lot of people seem to focus on WCF has an over-engineered SOAP framework. While that's very true, it is also the powerful successor to .NET original remoting framework. So WCF represents the unification of several different libraries and frameworks into one, for better or worse. It would not surprise me to find enterprises still using WCF for interprocess communication and/or remote method invocation. When both client and server are .NET programs, most of the time it just works in my experience.
- UK-AL 11y agoOne of the few ways to do high level IPC in .net.
- josteink 11y agoMicrosoft has open-sourced projects in the past and they have been given a warm welcome and really flourished under the open-source banner. Examples are ASP.Net, Roslyn and CoreClr. As much as I applaud this move by Microsoft, WCF has a reputation for being a terrible framework to work in the areas where it is most frequently employed, and I doubt it will be given the same welcome.
- Pxtl 11y agoEvery time I have to use WCF, I'm reminded that it stands for Windows Configuration Fuck-up.
- ChicagoDave 11y agoNever again will I work on WCF. I don't put the skill or experience on my resume and I have refused several jobs where it was required. Too brittle, complex, and with REST/OAuth 2, entirely unnecessary.
- mdpopescu 11y agoI was with you right until OAuth :) That thing is not as bad as WCF but still...
- talles 11y agoI'm so happy that I'm not the only one that hates WCF. Open sourcing an existing thing is never a bad thing though.
- wtfwcfballball 11y agoNot once does the page spell out, WTF does WCF stand for?
- dragonwriter 11y agoWindows Communication Framework.
- deleted 11y ago[deleted]
- jevgeni 11y agoI work in risk management for a financial institution. And although I'm on the "business" side of things, I do have to develop a lot of applications for own quant finance work. And frankly, to my team subsets of WCF (like for example, DataContracts) are becoming invaluable. Most of the comments I see here mention a JSON API or some other "REST" architecture suitable for a web app as a better alternative. This gives off an extreme "let them eat cake" kind of vibe. Seriously, there are other kind of systems than web apps. Having a way to strictly define your interfaces and your data flows, having an ability to quickly validate data that you get and communicate which kind of data you want is extremely important in situations where correctness of the result comes first, and you don't have control over the whole system landscape.
- nesnej 11y agoFor those who are looking for alternatives, you might be interested in WAMP which reminds a bit WCF. http://wamp.ws/ http://wamp.ws/
- deleted 11y ago[deleted]
- reubenbond 11y agoWhat is a good alternative to WCF if I want Binary+TCP. I used WCF in the past and didn't have trouble with it, but there is seething hatred for it in this thread. For the record, I eschewed XML configuration for code and instead of supporting a range of protocols/transports, I used binary over TCP.
- niaher 11y agoWould really like to know the same. I do get the hatred, but is there an alternative to exposing your API via HTTP and TCP in a simple way?
- buckyp 11y agoDirect link for the lazy https://github.com/dotnet/wcf https://github.com/dotnet/wcf
- kylequest 11y agoMicrosoft banned WCF inside Azure (their cloud platform), which says a lot about it :) At least, that's what Mark Russinovich, CTO for Azure, says...
- parasubvert 11y agoMy tall tale version of WCF: WCF (Indigo) was the attribute-oriented distributed object framework that every COM developer dreamed of, co-designed by COM's rock star author, teacher and orator Don Box, based on the successor to DCOM, which was WS-star. Back in the late 90s, there were basically three religions out there: CORBA, COM, and the nascent RESTafarians (REST wasn't coined until 2000, let's call these people "XML over HTTP" friends). Then Java came out with EJB and native CORBA, which everyone loved because it solved a problem with MTS/COM+ - it was simpler (believe it or not), and actually had a notion of lifecycle that was missing from most CORBA ORBs. Microsoft had to dodge this competitive threat, and IBM had to find a way to make MQ important again. XML was co-opted to be the new centre of everything, with the XML Infoset as the meta model for all data description AND message exchange. Protocols were to be a thing of the past, SOAP was protocol independent and WSDL described only message exchange patterns over TCP, UDP, HTTP, JMS or MQ. Never mind that 99% used HTTP and that all WSDL files were shared via HTTP GET. The church of WS* subsumed all other religions from around 2002 through 2007, and WCF was to be the crowning framework, destroying the ESB and the message broker the Microsoft Way. Then around 2007 everyone woke up from their 15 year peyote trip and realized, after tireless arguments from the RESTafarians, particularly Mark Baker, that REST made sense and most of the specs in WS-* were reimplementations of what already existed (WS-Addressing EPRs replaced URIs; WS-SecureConverstion was multi-way SSL over XML exchanges), niche (WS-ReliableMessaging, WS-AtomicTransaction) or hopeless (WS-Policy and children). All work ceased on WS*, and people stopped worshipping communication protocols mostly. (except REST, which became a bit inquisitorial for a few years now that it won, given many years of being the laughing stock of billion dollar vendors) REST on WCF was an afterthought that never really felt right. WCF was very general and smart, RESTful HTTP is very specific and even dumb. Different design for a different set of assumptions. That said I'm sure a lot can be learned from its approach to composing a generic layered system of communication capabilities.
- buckyp 11y agoSOA is dead for good. No use reviving WCF now. WebApI is the way forward.