1.2 A brief history of Automation

A brief history of Automation

In the beginning, there was DDE, Dynamic Data Exchange. DDE was Windows first attempt at allowing applications to communicate directly with each other. (Before that, of course, applications could communicate by sharing data through common file formats and the Clipboard.) With DDE, a document could be linked from a client application into a document in a server application. The server exposed one or more "topics" that it could make available; the client could then ask to "discuss" any of those topics. A number of applications still offer DDE.

OLE, the successor to DDE, incorporated several approaches to inter-application communication. The service that gives OLE its acronym, though, is the ability to put a document from one application (the server) inside a document from another (the client). You can link the server document to the client document so that the client document gets updated when the server document is changed. Alternatively, you can embed the server document in the client document, which makes a copy of the server document, breaking its ties with the original. These two choices led to the name Object Linking and Embedding. (Microsoft has actually disavowed that version of the name. As far as it s concerned, OLE is just OLE, but we find it easier to remember its meaning.)

Over time, OLE was extended to support in-place editing, which allows objects from one application to be both viewed and edited in another. When the user decides to edit the linked object, the client application s menu is replaced by or supplemented with items from the server application s menu. The user can edit the server document as needed and then return to the client application, at which point the original menus and toolbars return.

The frosting on the OLE cake, though, is Automation, which was introduced in OLE 2.0. With Automation, commands can be issued in one application and sent to another. They re written in standard object code, using the appropriate syntax for the host language (the one issuing them, which in our case is FoxPro). Think of Automation as one application grabbing a megaphone and telling another one what to do. The number of applications that work with Automation, either as the application holding the megaphone or as the application listening on the other end, is increasing all the time.

OLE or ActiveX or COM or what?

Since all of this comes from Microsoft, it goes without saying that the names of things have changed over time. When Automation was first introduced, it was called "OLE Automation." Then "OLE" was changed to "ActiveX," and OLE Automation became, briefly, ActiveX Automation. Ultimately, Microsoft dropped "ActiveX" from the name, and this technology became known as simply "Automation."

The technology that holds the whole thing together is COM (Component Object Model or Common Object Model, depending on the phase of the moon), which specifies ways for applications to work together. The COM umbrella incorporates the OLE/ActiveX techniques and even provides hooks into operating system objects, many of which also work with Automation.

The latest, hottest version of all this is DCOM (for Distributed COM), which allows COM to work across multiple machines. With DCOM, Automation can involve applications running on two different machines.

 

Copyright 2000 by Tamar E. Granor and Della Martin All Rights Reserved



Microsoft Office Automation with Visual FoxPro
Microsoft Office Automation with Visual FoxPro
ISBN: 0965509303
EAN: 2147483647
Year: 2000
Pages: 128

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net