First, the concept of component diagrams
A component is an actual replaceable part of a system that implements specific functions, conforms to a set of interface standards, and implements a set of interfaces. A component represents a part of the physical implementation of a system, including software code (source code, binary code, or executable code) or its equivalents (such as scripts or command files). Each component can implement certain functions individually, or it can provide interfaces for other components.
Second, the elements of the component diagram
Component diagrams are typically divided into: Execute files, files, libraries, tables, documents
(1) Execute file: The result of compiling source code, can run directly
(2) File: Information storage
(3) Library: Class library, dynamic link library, database
(4) Table: tables in the database
(5) Document: text material
Third, a bit of misunderstanding
A component is a physical abstraction, which is a file that can be replaced. Whereas a class is a logical abstraction, it contains properties and methods. For example, these logic abstractions are written out as source files, so these source files are artifacts.
The role of the component diagram
Component diagrams are primarily used to describe dependencies between various software artifacts, such as the dependencies between executable files and source files. The representation of the components in the designed system and the relationship between these components constitute a component diagram.
The structure and function of the system can be clearly seen by using the component diagram. To facilitate the project team members to specify work objectives and understand the work situation, at the same time, the most important point is conducive to software reuse.
The composition of the component diagram
Component diagram consists of: component, Relation, interface
The relationship here is mainly divided into dependency and implementation. Dependencies between common language components. The implementation is between the component and the interface.
Here the interface is mainly divided into the display interface and the introduction of the interface. The display interface is the interface of the component implementation. The introduction of interfaces is the interface used by the components.
Six, the significance of the component diagram
(1) The source code is modeled, it can be divided into several modules or subsystems to be processed.
(2) Modeling the relationships between executables, which can clearly describe the dependencies between executables.
Seventh, the drawing of component drawing
(1) To determine the external interface of the subsystem, the process subsystem and the outside of the system to contact the boundary processing.
(2) Determine the sub-components and interfaces. In the subsystem, the modules with different functions are divided into components, and the interfaces between the components and the components are determined.
(3) Determine the relationship between the components. Analyze the logical design relationship between components and draw a dependency graph.
Sinsing interpretation of Component diagrams in UML modeling