UML-----component diagram and deployment diagram

Both the component diagram and the deployment diagram belong to the realization diagram. It is used to describe implementation information. The component diagram is used to show the organization and dependency relationship between a group of components; and the deployment diagram is used to describe the physical topology of the system hardware and the software executed in this structure.

Component diagram

           Component diagram is to describe the main functions of a system from the perspective of software structure, such as subsystems, classes, packages, components, etc.

                  Component diagram type: 1. Source code component: source code file

                                       2. Binary components: object code files, static link libraries, dynamic link libraries

                                       3. Executable component: executable program

                                       4. Data files or documents

                  The composition of the component diagram:

                                    1. Components

                                                  The difference between component and class: 1. Class represents logical abstraction, while component represents physical abstraction

                                                                               2. Components are the physical realization of other elements

                                                                               3. Classes can directly have attributes and operations. Under normal circumstances, components generally only have operations that can only be accessed through other interfaces.

                                                  Features of components: 1. Physically exists

                                                                        2. Is replaceable

                                                                        3. Be part of the system

                                                                        4. Follow a set of interfaces and provide an implementation of a set of interfaces

                                    2. Interface

                                                      Show interface (export interface): the interface implemented by the component

                                                      Import interface: the interface used by the component

                                    3. Relationship                 

                                                      The relationship between the component and its corresponding interface: realization (realization)

                                                      The relationship between components and other components: dependency (dependency)

Deployment diagram     

           The deployment diagram describes the structure of the system at runtime, showing how the hardware configuration and software are deployed into the network structure. A system model has only one deployment diagram, which is usually used to help understand distributed systems.

                 Deployment diagram elements:

                         1. Node

                            It is a physical element that exists at runtime and represents a computable resource, which usually takes up some memory and has processing power. A component set is generally located at one node, but it is possible to transfer from one node to another.                  

                         2. Connect 

                                  The nodes of the deployment graph use association relationships to represent the communication paths between nodes, which are called connections. 

                                  Generally, the association relationship is not named, but stereotypes are used to distinguish different types of communication paths or communication implementations. For example, <<Ethernet>>, <<TCP/IP>> and <<HTTP>> can indicate communication Protocol or network type content    

                 The deployment diagram can be used in three systems: embedded system, B/S system and fully distributed system 

 

     The deployment diagram is just from here

Guess you like

Origin blog.csdn.net/weixin_44663188/article/details/112061137