The distinction between components (Component) and objects (object) is defined first:
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).
com and CORBA are at the bottom of the architecture, In terms of time, OLE is the first to appear, then COM and ActiveX, and from an architectural standpoint, OLE and ActiveX are built on top of COM, so COM is the basis; From a name perspective, OLE, ActiveX is two trademark names, COM is a purely technical term, which is why we 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 the introduction of 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.
The difference between Activex, OLE, COM, OCX, and DLL (GO)