I would like to find out about BOTH advantages and disadvantages of Windows Communication Foundation from people who have used it or just know it theoretically.
Advantages of WCF WCF provides better reliability and security compared to ASMX Web services. In WCF, there is no need to make much of a change to code to use the security model and alter the binding. Small changes in the configuration file will match your requirements. WCF provides interoperability between services.
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.
WCF is a best fit for scenarios like message queues, duplex communication, end-to-end message security, one way messaging, distributed transactions, etc. WEB API is a best fit to create a resource-oriented services using HTTP/Restful and it works well with MVC-based applications.
WCF provides the following types of credentials when working in transport-level security: None -- the service doesn't validate the client. Basic -- the client passes the user's credentials to the service, which is then validated. Windows -- the client uses a token that represents the identity of the logged-in user.
Primary advantage: Once you get over the learning curve, WCF makes it relatively easy to expose and consume software components. i.e. Given a component bakes functionality into a WCF Service Contract, a developer can expose that same component in-proc, across processes on a single box, across a Windows intranet, or throughout the internet all by just changing hosts and configuration information. Likewise it's easy for clients of said component to use it in any of those scenarios as well.
Primary disadvantage: the learning curve. WCF seems very daunting to many developers when they first begin looking into it. I made several false starts trying to get into Juval Lowy's "Programming WCF Services." Though I've found that comprehension came quickly once I began actually creating and consuming components.
The key thing to remember is that WCF let's you write some nice functional code and wrap it into a component that you can then relatively easily use just about anywhere with just about any amount of security, reliability and durability.
Compared to what we were forced to use previously, WCF is fantasitc!
A major advantage is that WCF allows a single consistent access to windows communication technologies for developers thereby enabling easier development of SOA applications. Microsoft has abstracted a lot of the plumbing work so as to enable this.
A drawback would be that, WCF is Microsoft's implementation of SOA and hence its APIs are solely controlled by MS which makes interoperability a bit difficult. Also, to deploy WCF apps, you will need more underlying hardware resources on the platform on which the WCF applications will be running, since there is an additional layer of abstraction to deal with.
For me it is that your code to communicate via SOAP, WS*, TCP, MSMQ, Named Pipes or any other transport later is the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With