Whats the advantages of using WCF over .Net Remoting , web service, etc
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 service provides us high level security framework which provide enterprise level security. It uses WS-I standard to provide secure service. But Web API uses web standard security such as basic authentication, token authentication and for more complex such as OAuth; Web API provides more flexibility.
WCF provides a common platform for all . NET communication. WCF services provide better reliability and security when compared to ASMX web services. In WCF, there is no need to make much change in code for executing the security model and alter the binding.
The Windows Communication Foundation (WCF) is a communication platform for the creation of distributed applications developed by Microsoft for the . NET Framework. Microsoft generally recommends two alternatives, gRPC and Web API, to replace WCF.
Web services can only be invoked by HTTP (traditional webservice with .asmx). While WCF Service or a WCF component can be invoked by any protocol (like http, tcp etc.) and any transport type.
Second web services are not flexible. However, WCF Services are flexible. If you make a new version of the service then you need to just expose a new end. Therefore, services are agile and which is a very practical approach looking at the current business trends.
We develop WCF as contracts, interface, operations, and data contracts. As the developer we are more focused on the business logic services and need not worry about channel stack. WCF is a unified programming API for any kind of services so we create the service and use configuration information to set up the communication mechanism like HTTP/TCP/MSMQ etc
For more details, read http://msdn.microsoft.com/en-us/library/aa738737.aspx
WCF is unifying technology that was built form the ground up to consider the multitude of communication use cases that have presented them selves over the years.
It has immense customisation capabilities so you can nearly always change out of the box functionality. It was/is designed for interoperability. As such it splits the complexity into many layers and allows you to pick an choose the best implementation for the job. Microsoft provide lots of the stuff out of the box, but you can alway roll your own.
It's incredibly extensible and has very good diagnostic capabilities. Remoting is not a competing technology, its just one of the technologies that cover one area that WCF can be used, but WCF can do more that just facilitate communication between .net objects. WCF can be used to build web services (I think you're referring to the older ASMX services?), well WCF allows more heterogeneous web services to be built (previously you'd have needed thinks like the WSE stuff to do this).
If you're considering WCF vs the other technologies then I'd suggest you consider what your requirements for long term usage are. If all you need is simple .net -> .net communication and that's all you'll ever do, then remoting is fine, however if you even think that you'll interoperation with other technologies/platforms then I'd seriously recommend that you look at what WCF provides.
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