Tutorials

▷ Connections with what they are and what they are for

Table of contents:

Anonim

COM is one of the terms that you will have heard the most within the PC world, in this article we explain what COM connections are and what they are used for. Prepared? Do not miss it!

What is COM and what is it for?

The " Component Object Model " (COM) is a binary interface standard for software components introduced by Microsoft in 1993. COM is used to enable the creation of communication objects between processes, in a wide variety of programming languages.

COM is the foundation for several other Microsoft frameworks and technologies, including OLE, OLE Automation, Browser Helper Object, ActiveX, COM +, DCOM, Windows Shell, DirectX, UMDF, and Windows Runtime. The essence of COM is a language-neutral way of implementing objects, which can be used in environments other than the ones they were created in, even across machine boundaries. For well-created components, COM allows objects to be reused without knowledge of their internal implementation, as it forces component implementers to provide well-defined interfaces that are separate from the implementation.

We recommend reading our article on How to install a hard drive in an external box

Different language allocation semantics are accommodated by making objects responsible for their own creation and destruction through reference counting. Type conversion between different interfaces of an object is accomplished through the QueryInterface method. The preferred method of "inheritance" within COM is the creation of sub-objects to which the "calls" method is delegated.

The COM connection a classic in development

COM is an interface technology defined and implemented as standard only in Microsoft Windows and Apple's Core Foundation 1.3 and in the later plug-in Application Programming Interface (API). The latter only implements a subset of the entire COM interface. For some applications, COM has been superseded, at least to some extent, by the Microsoft.NET framework and support for web services through the Windows Communication Foundation (WCF).

However, COM objects can be used with all.NET languages ​​through.NET COM interoperability. Network DCOM uses proprietary binary formats, while WCF encourages the use of XML-based SOAP messages. COM is very similar to other component software interface technologies, such as CORBA and Enterprise JavaBeans, although each has its own strengths and weaknesses. Unlike C ++, COM provides a stable application binary interface (ABI) that does not change between compiler versions.

This makes COM interfaces attractive to object-oriented C ++ libraries that must be used by clients compiled using different compiler versions. One of the first methods of interprocess communication in Windows was dynamic data exchange (DDE), first introduced in 1987, which allowed messages to be sent and received in so-called "conversations" between applications. Antony Williams involved in the creation of the COM architecture, then distributed two internal documents to Microsoft that embraced the concept of software components: "Object Architecture: Dealing with the security of unknown types in a dynamically extensible class library in 1988" and "On inheritance: What it means and how to use it in 1990."

This provided the basis for many of the ideas behind COM. Object Linking and Embedding (OLE), Microsoft's first object-based framework, was built on top of DDE, and designed specifically for composite documents. It was introduced with Word for Windows and Excel in 1991, and then included with Windows, starting with version 3.1 in 1992. An example of a compound document is an embedded spreadsheet in a Word for Windows document: as changes are made to the spreadsheet within Excel, they automatically appear within the Word document.

A bit of COM's history

In 1991, Microsoft introduced Visual Basic (VBX) extensions with Visual Basic 1.0. A VBX is a packaged extension in the form of a dynamic link library (DLL), which allows objects to be graphically placed in a shape and manipulated by properties and methods. These were later adapted for use in other languages ​​such as Visual C ++. In 1992, when Windows version 3.1 was released, Microsoft released OLE 2 with its underlying object model. The COM application binary interface (ABI) was the same as MAPI ABI, which was launched in 1992.

While OLE 1 focused on composite documents, COM and OLE 2 were designed to address general software components. Text conversations and Windows messages proved to be not flexible enough to allow robust and extensible sharing of application features, so COM was created as a new base and OLE was changed to OLE2. In 1994, OLE Custom Controls (OCX) were introduced as the successor to VBX controls. At the same time, Microsoft stated that OLE 2 would be known simply as "OLE, " and that OLE was no longer an acronym, but a name for all of the company's component technologies.

In early 1996, Microsoft found a new use for OLE Custom Controls, expanding its web browser's ability to present content, renaming some Internet-related parts of OLE " ActiveX " and gradually renaming all OLE technologies to ActiveX, except compound document technology. that was used in Microsoft Office . Later that year, DCOM was submitted as a response to CORBA.

This ends our article on what COM connections are and what they are for, remember that you can share it on social networks so that it can help more users.

Tutorials

Editor's choice

Back to top button