People who are familiar with object-oriented programming and network programming must not be unfamiliar with the concepts of ActiveX, OLE, and com/dcom, but what is the relationship between them is rather vague for many people.
Between the specific descriptions of their relationships, we will first identify the difference between the component (Component) and the object. A component is a reusable module that is a business object (Rules object) that consists of a set of processes, data encapsulation, and user interfaces. The component looks like an object, but does not conform to the academic definition of the object. The main differences are:
1) A component can be used in another application called a container (sometimes referred to as a bearer or host) or as an independent process;
2) A component can consist of a class, or it can consist of multiple classes, or a complete application;
3) components are reused for modules, and objects are code reuse.
Now, the more popular component models are the COM (Component objiect Module, Object component Model)/dcom (distributed COM, distributed object Component model) and CORBA (Common object Request Broker Architecture, public object request broker architecture). Here, there has been a topic related to this article COM, and CORBA is irrelevant to this article, not to be introduced. The reason from the difference between the components and objects, is to let everyone clear that COM and CORBA is at the bottom of the entire architecture, if temporarily not understand, may wish to continue to look down, and finally look back at the natural understanding.
Now you start to explain the relationship between ActiveX, OLE, and COM. First, let everyone have a general concept, from the perspective of time, OLE is the earliest, and then COM and ActiveX, from an architectural point of view, OLE and ActiveX are built on COM, so COM is the basis of, from the name perspective, OLE, ActiveX is a two trademark name, and COM is a purely technical term, which is why you hear more about ActiveX and OLE.
Since OLE is the first to appear, from OLE, since the Windows operating system became popular, the "clipboard" (Clipboard) first solved the communication problem between different programs (the Clipboard acts as a data exchange center for copying and pasting), but the clipboard passes "dead" Data, the application developer has to write and parse the code of the data format, so the communication protocol of Dynamic Data exchange (Exchange,dde) comes into being, which allows the application to automatically get the latest data from each other, but solves the "data format" between each other. Conversion is still a heavy burden for programmers. The creation of the object's link and embedding (Object linking and Embedded,ole) increases the data exchange of the original application to "Object Exchange", so that the program not only obtains the data but also obtains each other's application objects, and can directly use each other's data content, In fact, OLE is a composite document technology from Microsoft, and its original version was aimed only at compound documents, but in subsequent versions of OLE2, COM was imported. As a result, COM was born to the needs of OLE, so although COM is the foundation of OLE, the production of OLE is before COM.
COM's basic starting point is to have a software service for another software through a common organization. COM is born in response to Ole's needs, but its first consumer is OLE2, so there is not much relationship between COM and composite documents, in fact, later COM as a completely unrelated to the composite document technology, began to be widely used. As a result, Microsoft has started to "meddle" with common platform technologies. But COM is not a product, it requires a trademark name. At that time, Microsoft's market experts had chosen OLE as the trademark name, so the use of COM technology began to affix the OLE label. Although the vast majority of these technologies are not related to compound documents. Microsoft's approach has made it a misconception that OLE refers to compound documents only? Or does it just mean compound documents? In fact, OLE is the brand name of COM, and nature does not refer to compound documents. But Microsoft itself may not be able to explain that it takes considerable effort and time.
So, with the development of the Internet, in the spring of 1996, Microsoft changed its mind and chose ActiveX as the new trademark name. ActiveX refers to a loosely defined, COM-based collection of technologies, while OLE still refers to compound documents only. Of course, the most core technology of ActiveX is COM. The biggest difference between ActiveX and OLE is that OLE is for integration between application software and files on the desktop, while ActiveX is primarily for user interaction with further network applications. Here, we should have a relatively clear understanding of the relationship between ActiveX, OLE and COM, COM is the most fundamental core technology, so the following focus on COM.
It is a very novel idea to make the object model completely independent of the programming language. This is something we can learn from the concepts of C + + and Java objects. But what is the so-called COM object? For the sake of understanding, COM can be regarded as a kind of (software) packaging technology, that is, as a different part of the software, in accordance with a certain object-oriented form, combined into a process can be interactive and group support Library. COM objects can be written in any language, such as C + +, Java, and VB, and can be implemented in the form of DLLs or executable files that work in different processes. A browser that uses a COM object does not need to worry about what language the object is written in, or whether it is executed in a DLL or another process. From the browser side, there is no difference. Such a common processing technique is very useful. For example, two apps that are run by the user can be implemented as interactions between COM objects (and, of course, the OLE compound document now). To execute code downloaded from a Web server in a browser, the browser can think of it as a COM object, which means that COM technology is also a standard way to package downloadable code (which is what ActiveX controls do). Even methods of interacting with the native OS can be specified using COM, for example, in Windows and Windows NT, where new APIs are used, most of which are defined as COM objects. It can be seen that COM, although originated from compound documents, but it is effective for many software problems, it is at the bottom of the basic technology. In a word, COM is a language-independent component architecture that allows components to communicate with each other. With the development of computer network, COM further developed into a distributed Component Object model, this is the DCOM, it is similar to the CORBA Orb, this article will not do further elaboration.
I believe you have a clear understanding of the relationship between ActiveX, Ole, and com/dcom through the above narrative.
The relationship between activex,ole,com