Whats the advantag开发者_运维知识库es of using WCF over .Net Remoting , web service, etc
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.
精彩评论