Lesson 1
Component Object Model Basics
Component Software
COM, as its name indicates, is a specification and a set of development paradigms that supports the development of
software components. But what is a software component?
In general - a software component is a module that follows some component specification.
The two most popular component software technologies are COM and JavaBeans.
Components normally provide functionality via a set of functions or methods.
Unlike C++ libraries - we do not need the class definition of a component, nor do we need to link to a component.
All we need is a definition of its services and a way to access it.
We integrate with a component at runtime by having a service provider load the component.
Once the component is loaded we can access its services. This is called binary-level integration.
A common metaphor used by components is to provide properties, methods, and events or exceptions.
Component developers indirectly expose data as properties.
Properties are set via "get" and "set" methods. A component is asked to perform an action via a method call.
Events or exceptions are notifications sent from the component to the module using the component.
Application developers can use components to build applications by loading the components,
getting and setting its properties, calling its methods, and fielding events or exceptions from the component.
Module introduction
Getting the most out of this module
To get the most out of this module, you should be familiar with the following C++ concepts:
- classes and structures,
- constructors,
- inheritance,
- multiple inheritance,
- virtual functions, and
- pure virtual functions.
You do not have to be an expert in these areas.If you need a refresher, check out one of the books recommended on the Resources page.
COM Programming with Microsoft .NET