tags:

views:

200

answers:

4

COM technology seems a little outdated already, though still in use. But what approach is recommended now for implementing the same kind of interoperability when building a .NET app, specifically, in WPF?

I.e. what is a modern replacement of a COM object?

+5  A: 

What approach is recommended now for implementing the same kind of interoperability when building a .NET app, specifically, in WPF?

It's called WCF

WCF is designed in accordance with service oriented architecture principles to support distributed computing where services are consumed by consumers.

Joe R
Wouldn't WCF be a current analog of DCOM?
JLWarlow
I think that is a good point. DCOM was obviously an extension to COM.
Joe R
It's worth bearing in mind the whole question, which has "what approach is recommended now for implementing the same kind of interoperability when building a .NET app".
Joe R
+2  A: 

Take a look at the first paragraph in this wikipedia article.

WCF is the modern-day replacement for COM.

Jappie
.NET remoting and WCF are different technologies. Indeed, WCF supersedes .NET remoting.
Joe R
@Joe, true, I only referenced the article because it has a nice timeline in the first paragraph.
Jappie
+6  A: 

In a general sense, .NET itself is the replacement for COM, and the replacement for a COM object is a .NET assembly. See for example the highly suggestive chapter title of this early .NET book by Don Box and Chris Sells (who one can be pretty sure know what they're talking about...)

AakashM
+6  A: 

.NET was very much intended to be the replacement for COM. The project had many names while it was being worked on, but it started life as "COM+". This influence is still evident in many places. Many of the core source code files for the CLR start with the name "com", even though the CLR uses (almost) no COM at all. The Windows exception code for a managed exception is 0xE0434F4D. The last 3 byte values of the code is ASCII for "COM".

The assertion that WCF was a replacement is not accurate. It replaced .NET Remoting. COM has a very wide range, it is a generic interop tool, much like the CLR allows many languages to interoperate. One of its features was supporting interop between different processes and machines, perhaps the source of the statement. But that's just a part of it.

There are still lots of COM applications that have not been replaced by .NET. The best example is the Windows shell, Explorer.exe. Pretty hard to do something as simple as creating a context menu shell extension in C#. And until .NET 4.0 strongly discouraged.

Hans Passant