Reference: http://hi.baidu.com/1987raymond/blog/item/ae2030f35223d5c70b46e041.html
A component diagram, also known as a component diagram, shows the organization and dependencies between a group of parts for source code, executable release, physical database, and adjustable system modeling.
This article introduces
Vs2010
Component diagram in
UML component Divisor
.
I,
Create a widget
Selected
Modelingprojecttest
, Right-click
| Add | new item | installed Templates | modeling | UML use component dimo-
, Input file name
Umlcomponentdiagramtest. componentdi #
, Click
Add
Button to create an empty widget.
2. Content contained in the component Diagram
Slave
Toolbox
In the toolbox, we can see that the component diagram contains the following content:
Component |
Add a component, which is a reusable unit of system functions.
|
Dependency |
Specify that an element depends on another element.
|
Delegation |
Connects a port on a component to a port of a component.
|
Provided Interface |
Add a port to provide operations or services defined in an interface to other components.
|
Required Interface |
Add a port that requires other components to provide operations or services defined in an interface.
|
Comment |
Add remarks
|
Generalization |
Specify that a component inherits features and behaviors from other components.
|
Connector |
Create a default relationship between elements
|
Part assembly |
Specifies the connection between components in a component.
|
3. Implement the component Diagram
A simple component diagram is created for each project created before this series of articles, indicating the relationship between each component, mainly dependency.
In,
Webapp
Components depend on
Common
,
Config
,
Data
Component;
Common
Components depend on
Config
,
Data
Component;
Dataproviders
The component inherits
Data
Some functions and behaviors of components are provided
Iwebappdataprovider
Interface, while
Webapp
Component requirements
Iwebappdataprovider
Interface.