views:

187

answers:

3

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 Web Services or distributing a pre-compiled Assembly, what are the pros and cons of using each? This is assuming that Windows OS is used.

A: 
Justin Niessner
I am actually taking more into consideration. Such as WSDL is a slower implementation as compared to a DLL which makes use of TCP sockets. On the other hand, WSDL is more portable and can be used on Linux, Mac, etc.
Lopper
WSDL isn't an implementation of anything. It's simply a definition language. It sounds like you're talking about Web Services vs. Distributing a pre-compiled Assembly. Am I right?
Justin Niessner
Yes. You are right.
Lopper
@Lopper - I would change the wording of the question to reflect that then.
Justin Niessner
+1  A: 

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.

Irwin
A: 

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.

bryanjonker