Notes UML Basics

Source: Internet
Author: User

UML: unified modeling language. Provides a unified, standard, and visualized modeling language for Object-Oriented software design. It is applicable to the whole process of describing case-driven, architecture-centered software design.

UML definitions include UML Semantics and UML notation.

A uml Model diagram consists of transactions, relationships, and diagrams. A thing is the most basic component in a UML Model diagram. It is the abstraction of representative components. A relationship closely associates things. A graph is a visual representation of things and relationships.

UML things include building things, grouping things, behavior things, and commenting things.

Build things: the static part of the UML model, describing the concept or physical elements.

Behavior thing: the dynamic part of the UML model, which describes the behavior that spans space and time.

Interaction: a set of messages between a group of component things that implement a function, involving messages, action sequences, links

State Machine: describes the sequence of states that a thing or interaction experiences in responding to an event within the lifecycle.

Group transaction: the organizational part of the UML Model diagram, which describes the organizational structure of the transaction.

Package: Organizes elements into groups.

Annotation: The description of the UML model. It is used to describe and explain the elements in the model.

Annotation: A simple symbol that restricts or interprets elements.

UML relationship:

Dependency: the semantic relationship between two things. A change in one thing (independent thing) affects the semantics of another thing (dependent thing.

Association: a structural relationship that specifies the relationship between the object of a transaction and the object of another transaction.

General Relationship: A special/general relationship. It can be viewed as an inheritance relationship.

Implementation relationship: it is the semantic relationship between class elements. One Class element specifies the contract that is executed by another class element.

UML diagram and features:

Use case diagram: the use case diagram describes the system functions from the user's perspective and is a model diagram of the system functions that the user can observe. the use case is a function unit in the system.

Class diagram: A class diagram describes the static structure of classes in the system. It defines not only the classes in the system, but also the relationships between classes, such as association, dependency, and aggregation. It also includes the internal structure of the class.

A class chart is a Class-centered structure. Other elements in the class chart belong to or are associated with a class.

Object graph: an object graph is an instance of a class graph. It uses almost identical identifiers. Their difference is that the object graph shows multiple object instances of the class, rather than the actual class.

Sequence diagram: a sequence diagram shows the dynamic cooperative relationship between objects. It emphasizes the order in which messages are sent between objects and displays interactions between objects.

A Sequence Chart is used to represent the behavior sequence in the use case. When a use case behavior is executed, each message in the sequence diagram corresponds to a class operation or trigger event that causes state conversion.

Collaboration diagram: A collaboration diagram describes the relationships between objects. Similar to a sequence diagram, a collaboration diagram shows the dynamic relationships between objects. In addition to information exchange, the collaboration chart also displays objects and their relationships.

A collaboration chart is used to represent the implementation of a class operation.

Status chart: a status chart is a model chart of all routines that a class object may experience. A status chart consists of the status of an object and the transition of these statuses.

Activity diagram: An activity diagram is a variant of the state diagram used to describe the activities involved in the workflow that executes the algorithm.

An activity diagram describes a set of ordered or concurrent activities.

Component diagram: The component diagram establishes a model for the system component. A component is a software unit that constructs an application. It also includes dependencies between components to estimate the impact of modifications to system components.

Deployment diagram: Deployment view describes the scheduling of running component instances on node instances. A node is a group of running resources, such as computers, devices, or storage. This view allows evaluation of allocation results and resource allocation.

Relationship between UML diagrams:

UML syntax description:

Use case diagram

The use case diagram is a model diagram of the system functions observed by external users called participants. The use case diagram lists the use cases in the system and the participants outside the system, and shows which participant participates in the execution of which use case (or the use case initiated ).

Use Cases are a unit of system functions that are visible outside the system.

Relationships and explanations in the use case diagram:

Class DiagramA class diagram describes the structure of a software system for the purpose of reflecting the structure (attributes, methods) of a class and the relationship between classes. It is a static modeling method.

Sequence Chart

A Sequence Chart is used to indicate the behavior sequence in the use case. When executing a use case behavior, each message in the sequence diagram corresponds to a class operation or a transformation event in the state machine.

A sequence chart shows interactions between objects. These interactions occur in the event stream of a scenario or use case. A sequence chart is a type of dynamic modeling.

The sequence diagram focuses on message sequences, that is, it describes how messages are sent and received between objects. Indicates the time sequence of messages sent between objects.

You can view the exchange messages between objects from top to bottom.

Collaboration Diagram

A collaboration diagram is an interaction diagram that emphasizes the organizational structure between the objects that send and receive messages. A collaboration diagram is used to describe the dynamics of the system.

A collaboration diagram mainly describes interaction and links between collaboration objects, displays links between objects, and how to send messages between objects.

A collaboration chart can represent the implementation of class operations.

Comparison between a collaboration diagram and a sequence diagram

A collaboration diagram and a sequence diagram both represent the interaction between objects, but they have different focuses.

The sequence diagram clearly indicates the time sequence (emphasizing time) in the interaction, but does not explicitly indicate the relationship between objects.

The collaboration diagram clearly indicates the relationship between objects (emphasizing space), but the time sequence must be obtained from the sequence number.

The collaboration diagram and sequence diagram can be converted to each other.

Status chart

A state chart shows the sequence of states that an object experiences in responding to events during its lifecycle and their responses to those events.

The status chart is used:

Describes the complex features of actor, classes, subsystems, and components.

Real-time system modeling.

Status chart composition: Status and transfer.

The object State refers to a condition or state in the life cycle of the object, during which the object will meet certain conditions, execute certain activities, or wait for certain events.

A transfer is a migration from one state to another. This transfer is triggered by internal or external events of the modeled entity. For a class, transfer is usually the result of calling an operation that can cause an important change in the status.

Activity diagram

The activity diagram describes the dynamic behavior of the system.

Contains the activity status. The activity status refers to an execution step or operation of a business case, not the status of a common object.

The activity diagram is suitable for describing the logical execution process inside the system without triggering an external event. Otherwise, the state chart is easier to describe.

Similar to the traditional flow chart.

Activity diagrams are mainly used:

Business modeling is used to describe business cases and describe the execution process of a business;

Describes the operation process during design.

Component Diagram

The component diagram is used for static modeling. It represents the organization of the component type and the dependency between various components.

The component diagram describes the dependencies between components to estimate the impact of modifications to system components on the system.

Deployment Diagram
The deployment diagram is used for static modeling. It represents the node structure, component instance, and object structure during running.

If a component instance with dependency is deployed on different nodes, the deployment view shows the bottleneck during execution.

The deployment diagram is shown in the instance-layer deployment diagram and description-layer deployment diagram.

Comparison between deployment diagram and component Diagram

The deployment diagram and the component diagram share the same components:

Components, interfaces, component instances, and components provide external services, and components require external services.

Relationship between a deployment diagram and a component diagram:

Deploy component instances;

A component chart represents the definition of a component type.

The deployment diagram tends to describe the running status of the component in the node, and describe the running environment of the component. The component diagram tends to describe the basic relationship between the dependent components.

 

Appendix

Wave test:

1. What to do? (Not how to do .)

2. Actor's point of view?

3. value for the actor?

4. Entire Flow of events?

UML model diagrams used in various stages:

Relationships between all UML diagrams:

Notes UML Basics

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.