Tuesday, December 8, 2009

.Net Remoting versus COM

I’ve been looking into .Net Remoting as an alternative to COM for being able to use objects across application boundaries (See my separate article on ROTHook).

.Net Remoting has the potential to do most or perhaps all of the things we’ve done in the past with COM, but it would not seem to be a good use of that technology to do that.  Here’s how I see it:

  • COM is designed around objects
  • .Net Remoting seems to be designed around a service-oriented environment

To illustrate the difference, here’s a little analogy that seems to be appropriate.  Suppose you want to hear a dog bark:

  • Using COM you would tell it to create a “dog” object and COM would give you back the entire “dog” object.  At that point, you could call the “bark” method on the “dog” object to get it to bark.  While you had the “dog” object, you could also call any other methods you wanted to “wag tail”, etc.
  • With the services approach that .Net Remoting seems to be designed around, you would simply call the “dog bark” service and it would bark for you.  If you want to call other methods like “wag tail”, that would generally be a different service.

That’s how I see the difference between the two approaches.  I hope that helps others see it…it took me a little while to get there.

Chuck

0 comments:

Post a Comment