Board index » delphi » DDE vs OLE/COM/ActiveX

DDE vs OLE/COM/ActiveX

What is the relationship between DDE and COM?  What is the relationship
between Remote DDE and DCOM?  Does COM support DDE?  Does COM replace DDE?
Is DDE dead?


Re:DDE vs OLE/COM/ActiveX


DDE was an early IPC (interprocess communications) technology based on
windows message passing, i.e. an extension of the standard WM_ type
messages that make windows work. Remote DDE was a later evolution that
allowed a partner program to be started up and controlled over a network,
but the core technique was still windows message passing, albeit over a
LAN. DDE today is basically obsolete. The weakness of DDE was always that
it was a hack, not a well-designed protocol, and it was full of undefined
conditions, the messages and states were not fully specified. As a result,
DDE and remote DDE implementations cannot be made very solid. Things get
out of sync, and you end up with hung programs, broken links, etc. Early
forms of OLE were extensions of DDE, allowing e.g. the clipboard to be used
between programs.

COM is quite different as it is based on RPC, remote procedure calls. RPC
was much better defined, having been designed and implemented on Unix
systems for years. The premise of RPC is that a set of cross-platform
standard data types are defined, and a protocol exists for calling a
function remotely over a network as if the function were running locally.
RPCs were being used on Sun workstations while PCs were still running DOS.
When COM was being designed, the whole RPC system was mature, but oriented
to a compiled language like C, because the Interface description language
(IDL) file that defined the function's parameters and return values had to
be compiled into the app. COM extended this to a binary standard  that no
longer had to rely on compiled IDL files, because it exposed a set of
standardized interfaces. These could be queried and the function's
parameters could thus be deduced at any time, from compile time (early
binding) to run time (late binding). The LPC was developed as an efficient
way to use the same techniques between procedures on the same machine. The
OOP concepts of Properties and Methods were applied, and the COM object as
we know it was born.

Today the bleeding edge is in the area of creating a framework for
instantiating COM objects over a network, with provisions for pooling,
failover, automatic location, bracketing of chains of remote methods into
indivisible transactions, etc. Microsoft Transaction Server (now part of
NT) is the main vehicle for these sorts of systems, although other software
is being developed for this purpose, such as Borland MIDAS.

The flexibility that allows it to be used in so many ways makes COM one of
the most important innovations in component software in the last few years,
and it's quite a cut above DDE as an IPC mechanism. It's what the whole
ActiveX/OCX/OLE/COM/DCOM technology is based on, and allows communications
between applications and components in a much more robust manner than DDE,
either as a DLL interface (e.g. an OCX), to a local EXE (OLE Automation),
or a remote EXE (DCOM) over a LAN or WAN.


Gordon Augat <> wrote in article

> What is the relationship between DDE and COM?  What is the relationship
> between Remote DDE and DCOM?  Does COM support DDE?  Does COM replace
> Is DDE dead?

Other Threads