9

What is it? As I understood it's a kind of Microsoft special technology for some objects. But what exactly?

4 Answers 4

3

It's basically an old technology used for writing programs in the Windows environment. It's big and complex and wasn't enjoyable to manage/support. The .NET framework is its replacement.

3
  • 2
    aren't COM objects used in .NET framework?
    – Sergey
    Apr 21, 2011 at 17:37
  • 3
    They can be called from .NET, but they are a completely different system. It's called COM Interop. You can explore them a bit on your computer - under Control Panel >> Administrative Tools >> Component Services.
    – Morgan T.
    Apr 21, 2011 at 20:00
  • 2
    COM isn't going anywhere any time soon. It's extensively used by Microsoft's own products. I think it's therefore a bit misleading that you call it "basically an old technology". Yes, it was first introduced in the early 90s, so technically it is "old" in the sense that it's been around a while, but you need to take care not to indicate that it is obsolete or outdated. Apr 17, 2012 at 3:10
12

A COM object is basically a black box that implements some known interface. It can also register itself with Windows so that programs can get a hold of it.

For example, let's say there is some interface ICalculator, that I write my program to use. I can now swap in any object, written in any programming language (since it is a binary interface) that implements ICalculator. Then at runtime, I can provide some sort of option to my users so that they can choose to use the FooCorpCalculator COM object, written in Python, or perhaps if they need more speed they can choose a NinjaCalculator written in C. The point is, I write my program to depend on an interface, not an implementation, and then choose to use the actual COM object that implements the interface later.

There's a lot more to it, of course, but that may be an example that makes it more concrete for you.

4

See this Wikipedia article: Component Object Model

Component Object Model (COM) is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages. The term COM is often used in the Microsoft software development industry as an umbrella term that encompasses the OLE, OLE Automation, ActiveX, COM+ and DCOM technologies.

A COM object is often implemented in a DLL file. They can be used by programs for a variety of functions. The term "object" as used here refers to objects in object-oriented programming.

1
  • 1
    that's why I asked this question. because the Wikipedia didn't answer it. The definition is very abstract and I don't see any real example.
    – Sergey
    Apr 21, 2011 at 17:24
1

COM is set of Windows-specific technologies to enable code reuse and interoperability, primarily at the level of the binary (not necessarily at the level of the source code).

In the early 1990s Bill Gates didn't permit that the Powerpoint development team implement an own charting subsystem for the Powerpoint product, because Microsoft already had Excel. So they developed a specification to enable their in-house products to exchange data and call each others functions. Microsoft generalized these APIs, published them and a lot more code design guidelines.

See this video from 2006: Tony Williams: Co-inventor of COM

I think, that now in 2012, COM is still at the core of WMI and Office.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .