开发者

WSDL vs DLL. Which is better?

开发者 https://www.devze.com 2022-12-28 09:39 出处:网络
I would like to create a reusable interface to transfer some proprietaryinformation over the TCP/IP connection. If given only the choice of either We开发者_JAVA百科b Services or distributing a pre-com

I would like to create a reusable interface to transfer some proprietary information over the TCP/IP connection. If given only the choice of either We开发者_JAVA百科b Services or distributing a pre-compiled Assembly, what are the pros and cons of using each? This is assuming that Windows OS is used.


I would go with the web service (WSDL) because as long as we agree on the interface, the way I implement it can change many times, or as my demands/resources change, without requiring the client to modify its assemblies (DLL) to benefit from those changes.


A WSDL is a Web Service Definition. Are you creating a Web Service? If so, then use a WSDL.

If not, supply the DLL.

Based on comments, the question is a comparison of Web Services Vs. Precompiled Assembly.

In that case, I would recommend looking at using WCF to provide a service with a Tcp Endpoint using binary serialization. Using that method, you won't have to distribute any assemblies and you'll get something that is fairly fast as well.


Assuming the question is "use net.tcp WCF or build your own transfer", I would recommend using a net.tcp WCF service if you are running IIS 7.0. It's easy to implement and decouples your systems from each other. Also, binary serialization is handled free of charge.

If you are not running IIS 7.0, then you'll need to add code for continual scanning, and building a custom DLL / listener may make more sense.

0

精彩评论

暂无评论...
验证码 换一张
取 消