What is a component?
A component is similar to a micro application, which is already compiled, linked, and ready to use, and the application is packaged with multiple such components. Custom components can be connected to other components at run time to form an application. When you need to modify or improve an application, simply replace one of the components that make up this application with a new version.
COM components
COM, the Component Object model, is a specification that demonstrates how to build a dynamic, interactive component that provides some of the standards that customers and components should follow to ensure interoperability.
COM components are executable code published in the form of a WIN32 dynamic-link library (DLLs) or executable (exes). COM components must meet the following conditions:
1.COM components are completely language-independent;
2.COM components can be published in binary form;
3.COM components can be upgraded without interfering with old customers;
A COM component can be transparently reassigned to a location on the network.
Advantages of using Components
1. Application Customization
Component architectures are inherently customizable, as users can replace a component with components that are more responsive to their needs;
2. Component Library
One of the most compelling advantages of component architecture is rapid application development. This advantage allows the developer to remove the required components from a component library and assemble them quickly into a piece to construct the required application, like building blocks;
3. Distributed components
Component architectures can simplify the process of developing such distributed applications. In fact, a client/server application is the first step to a component architecture. Where the entire application is divided into two parts: the client part and the server part.
Summarize
COM provides a standard way to write components. Components that follow COM standards can be grouped together to form applications. It doesn't matter who wrote the components and how they were implemented. Each COM component can be used in conjunction with other components. The key issue in implementing this dynamically changing component is the encapsulation of information. For encapsulation, COM is implemented through a connection or interface between the component and the customer. For the interface, I'll summarize the next blog post.