Lesson 1
Introduction to Common Object Model
COM Reuse Mechanisms
- Understand source code and binary-level reusability
- Understand COM's reusability mechanisms
- Understand containment/delegation
- Develop a COM object that reuses another COM object via containment/delegation
- Understand aggregation concepts
- Develop a COM object to support aggregation
- Develop a COM object that aggregates another COM object
- Develop a COM client that uses composite COM objects built from containment/delegation and aggregation
Microsoft's Component Object Model (COM) is a system for reusing software artifacts at the post-compilation level or binary level .
Using COM, one or more computational functionalities of a component can be made available through a system call and through constructs called interfaces. A client of a component, for example a program that needs the functionalities of the component, is served through a protocol called interface negotiation.
Several components may be combined into one component using the aggregation method to put all or part of the functionalities of
the constituent components into the new component.
Component Object Model provides a facility to reuse software artifacts. Several programs running on a system (a personal computer running a Windows 10 operating system) can share loaded COM software (called a server) to get a number of computational processes. The source code of the program may be from different programming languages.
There are several ways to reuse software artifacts including
- reusing source code,
- reusing flowcharts or diagrammatic expression, and
- reusing concepts.
The stated cases of artifact reuse can be categorized as the pre-compilation ones. Reusing a .dll or a .exe file is a case of reuse at the binary level for software artifacts. A change in a non-COM .dll or .exe library usually requires a significant amount of work for adjusting it to a specific a client. COM, a standard of reusing software artifacts at the binary level, helps reduce the amount of such adjustments at a client side.