Note: Finishing from the learning package, not completely original, the original can not be examined.
--------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------
One, use case diagram ( Use case)
Participants, the people or things that achieve their goals by using system services
Use cases, externally visible system functions, describe the services provided by the system. represented by an ellipse. use cases are verbs or verb nouns. You can extract the use cases from the main functions of each interface.
Relationship:
The relationships involved in a use case diagram are: Association, generalization, inclusion, and extension.
As shown in the following table:
Relationship |
Objects involved |
Symbol |
Arrow direction |
Association |
Participants and use cases |
|
No arrows |
Generalization |
Participants and participants Use cases and Use cases |
|
Point to parent use case or parent participant |
Contains |
Use cases and Use cases |
|
Point to the decomposed function |
Extended |
Use cases and Use cases |
|
Arrows point to the underlying use case |
Generalization
Contains
Extended
Note : The part of speech of a use case (verb noun), the association is a solid line without arrows
second, the activity diagram ( Activity)
Each use case has an activity diagram, the activity diagram is as simple as possible
Start node: (Only one)
End node: (can have multiple)
Synchronization bar: (must appear in pairs), indicating parallel execution
Select/Merge: (need to specify the criteria of the branch)
Activity: (round edge rectangle, must be distinguished from state diagram, verb noun , can be analyzed from the execution flow of a use case)
Note: The synchronization bar must appear in pairs, the decision to specify conditions, the activity of the box must be round edge rectangle
three, the state diagram ( Statement )
Each use case has a state diagram that shows the entire life cycle of an object from creation to extinction
State: Indicates a condition in which an object has a condition (noun or not verb noun format)
Transfer: Event name [ Guardianship condition ]/ action name (if "/" appears in front of it, it is the action of the system, not the action of the user)
start / end Status:
Note: The state is rounded rectangle, the state cannot be an action (verb noun format), but a condition (noun or noun + verb format) must have the condition to change the conditions
iv. domain model (domainmodel )
A set of class diagrams, also known as conceptual class diagrams, that do not define an operation (a feature tag for a method)
Step: (1) find the concept class
A concept: an idea, thing, or object (that is, a noun ).
Description class: Information describing other things, such as It is best to add a flightdescription to this description class between Flight and Airport .
(2) draw it as a class of UML class diagram
(3) adding associations and attributes
Association: The name needs to be capitalized, and is typically named in the format of the class name- verb phrase - class name. But in the domain model, to avoid joining too many associations, whether the need to record associations, based on the real-world needs, is those "need to remember" the association relationship.
multiplicity: Class A How many instances can be associated with An instance of class B
0 or more
1 or more
1~40
property: The logical data value of the object. introduce attributes when a requirement ( use case ) suggests or implies that information needs to be remembered
(can only attribute name, no type, visibility)
Note: usually no more than ten concept classes, at least one description class, cannot appear XX list
five, System sequence diagram ( SSD)
For a particular scenario of a use case (typically a use case), external actors generate events, their order, and events such as Systems . The graph highlights events that span the system boundary from the participant to the system.
( i.e. the system is considered a black box )
Participants: Need to add ': ' and underline
System:
Cycle:
Note: The object must have a ":" and an underscore, the message needs to be numbered, and the message is an action, which must have a control focus, no more than 5 messages, as simple as possible
Six, Package diagram
( MVC Architecture View" is the UI, boundary class"model"entity class, from the domain model to select the"Control "class")
Dependency: Arrows point to the dependent package (the package's diagram is dashed)
Layer:
Classes, use cases, etc.:
Embed package:
Note: There must be a dashed line between the package and the package
Seven, sequence diagram
Arrangement of object Interaction in time
Roles ( Actor) system roles, which can be people, and even other systems or subsystems.
Object: (the name is preceded by a ":" and an underscore) (the object is typically a use case-related boundary class, control class, entity Class) mentioned in the former bread chart
Lifeline: Represents the time at which an object exists
Control Focus: Represents the period during which an object performs an action (or it can be used without this)
Message: (The message needs to have an ordinal number and the message is an action)
Synchronization message: The sender of the message passes control to the recipient of the message, and then stops the activity, waiting for the recipient of the message to discard or return control. Used to indicate the meaning of synchronization.
Asynchronous message: The message sender passes a message to the recipient of the message, and then resumes its activity without waiting for the recipient to return the message or control. The recipient and sender of an asynchronous message are working concurrently.
Self-Invocation Information: Represents the method's own invocation and one method within an object that calls another method.
Note: The object must have a ":" and an underscore, the message needs to be numbered, and the message is an action, must have the control focus, the object from the package diagram
Viii. Design class Diagram
Class:
(corresponding to the sequence diagram, divided into entity classes (domain model classes), boundary classes (interfaces), control classes)
Relationship |
Representing relationships |
Symbol |
Arrow direction |
Association |
|
|
|
multiplicity |
multiplicity: Class A How many instances can and classes b< One instance of span lang= "ZH-CN" Association |
|
no arrows |
dependency |
indicates that one class depends on another class Definition, where one class change affects another class ( use < Span lang= "ZH-CN") |
|
pointing to the dependent class |
Generalization |
The inheritance relationship of the class to the class. Subclasses inherit all the special attributes, actions, and relationships of the superclass and have their own attributes Scene: Father and son, plant and tree, etc. |
|
Point to parent use case or parent participant |
Realize |
Class-to-interface implementation relationships |
|
Point to Interface |
aggregation |
When one class becomes another section, you can use a clustered relationship that represents the relationship between the classes as a whole and a part ( has ) |
|
partially pointing to the whole |
combination |
objects a contains objects b< Span lang= "ZH-CN", Object b Leave object A contain |
|
partially pointing to the whole |
composition > aggregation > correlation > dependencies
Note: The class name needs to be the same as the domain model, the sequence diagram, at least 1 properties per class ,1 operations;
Note the inheritance, the aggregation of these relationships, the difference between solid and dashed lines, the relationship between classes is a few pairs of relationships, it is important to maintain consistency with the previous diagram
IX. deployment diagram
(The entire system is one) can be modified by modifying this basic model to do
Note: There are no arrows between the nodes, whether the node is a software or a physical device needs to be marked, need to write clear the connected media (such as network cable those ), protocol (HTTP , etc.)
--------------------------------------------------------------------------------------------------------------- ---------------------------------
UML Drawing Essentials