Nine types of UML model diagrams

Source: Internet
Author: User
Tags object model

First, as a modeling language, the definition of UML includes two parts of UML semantics and UML notation. UML semantics: Describes the definition of exact meta-model based on UML. UML notation: Defines the representation of UML symbols, providing a standard for system modeling for developers or development tools using these graphical symbols and text syntax. These graphical symbols and literals express the application-level model, which is semantically an instance of the UML Metamodel. Second, the standard modeling language UML can be defined by the following 5 types of diagrams. Use case diagram: Describe the system function from the user's perspective and indicate the operator of each function. static diagram: Includes class diagrams and object graphs. The class diagram describes the static structure of a class in a system, defining not only the classes in the system, but the relationships between classes, such as associations, dependencies, aggregations, etc., as well as the properties and operations of the class, which describe a static relationship that is valid throughout the life of the system. An object graph is an instance of a class diagram that uses almost exactly the same identity as the class diagram. An object graph is an instance of a class diagram. Because the object has a life cycle, the object graph can only exist at some time in the system. Behavior diagram: Describes the dynamic model of the system and the interaction between the constituent objects, including the state diagram and the activity diagram . A state diagram describes all possible states of an object of a class and the transition condition of the state when the event occurs, which is a supplement to the class diagram, which describes the activities that are required to meet the use case requirements and the constraints between activities, and facilitates identification and activity. Interaction diagram: Describes the interactions between objects, including time series diagrams and collaboration diagrams . The time series diagram shows the dynamic partnership between objects, emphasizing the order in which messages are sent between objects, displaying the interaction between objects, and collaborating diagrams that describe the collaborative relationships between objects, which are similar to sequence diagrams and show the dynamic relationships between objects. In addition to displaying information exchange, collaboration diagrams display objects and their relationships. If the time and order are emphasized, the timing diagram is used, and the collaboration diagram is selected if the subordinate relationship is emphasized. Implementation diagram: Includes component diagram and deployment Diagram . The component diagram describes the physical structure of the code part and the dependencies between the parts, and the component diagram helps to analyze and understand the degree of interaction between the parts; The deployment diagram defines the physical architecture of the software and hardware in the system.

When using UML to design a system, the first step is to describe the requirements, and the second step is to build a static model of the system to construct the structure of the system; The third step is to describe the behavior of the system. The model established in the first and second steps is static, including 5 kinds of graphs, such as use case diagram, Class diagram, object graph, Component diagram and deployment diagram, and is the static modeling mechanism of the standard modeling Language UML. The model established in the third step can either be executed, or indicate the timing state or interaction at execution time. It includes 4 kinds of graphs, such as state diagram, activity diagram, time series diagram and collaboration diagram, and is the dynamic modeling mechanism of UML in standard modeling language.

The

begins with a brief introduction to the functions of each diagram in UML: 1, use case diagram     describe roles and the connection between roles and use cases. It explains who wants to use the system and what they can do with the system. A use case diagram contains several model elements, such as systems, actors, and use cases, and shows the various relationships between these elements, such as generalization, association, and dependency. 2, Class Diagram     class diagrams are static views that describe the classes in the system and the relationships between the classes. Allows us to have a comprehensive understanding of the system before writing the code correctly. A class diagram is a model type, exactly, a static model type. 3, Object graph     is very similar to a class diagram, an instance of a class diagram that shows multiple object instances of a class rather than the actual class. It does not describe relationships between classes, but relationships between objects. 4, Activity diagram     describe the activities that the use case requires, as well as the constraints between activities, to facilitate the identification of parallel activities. The ability to demonstrate where features exist in the system, and how these functions and the capabilities of other components of the system together meet the business needs of using use case diagrams to model earlier. 5, State diagram     describes all possible states of an object of a class, and the transition condition of the state when the event occurs. You can capture the life cycle of objects, subsystems, and systems. They can tell the state that an object can have, and how events (such as the receipt of messages, the passage of time, errors, conditions becoming true, etc.) will affect these states over time. A state diagram should be connected to all classes that have a clear, identifiable state and complex behavior, which determines the behavior of the class, how the behavior changes depending on the current state, or what events will change the state of the object of the class. A state diagram complements a class diagram. 6, Sequence diagram (sequence diagram)     sequence diagrams are models that show how your participants interact with the system's objects in a series of sequential steps. Sequence diagrams can be used to show how objects interact with each other. The sequence diagram will focus on the message sequence, emphasizing how messages are sent and received between objects. 7, collaboration diagram

Similar to sequence diagrams, shows the dynamic relationships between objects. Can be seen as the intersection of a class diagram and a sequence diagram, a collaborative diagram modeling object or a role, and how they communicate with each other. If the time and order are emphasized, the sequence diagram is used, and if the subordinate relationship is emphasized, the collaboration diagram is selected, and the two graphs are called interaction graphs. 8 . Component Diagram (assembly diagram) describes the physical structure of the code component and the dependencies between the various constructs. The components used to model software and their relationship to each other, which are composed of the relationship between the component marker and the component. In a component diagram, a component is a single component of software that can be a file, product, executable, script, and so on. 9, the deployment diagram (configuration diagram) is used to model the physical deployment of the system. such as computers and devices, and how they are connected.     The users of the deployment diagram are developers, system integrators, and testers. the difference between several graphs:

One: Each of the nine models have a focus,

1: Use case diagram focuses on describing user needs,

2: The class diagram focuses on describing the system implementation;

Two: The description of the aspects are not the same,

1: The class diagram describes the structure of the system,

2: The sequence diagram describes the behavior of the system;

Three: The level of abstraction is also different,

1: Component diagram describes the modular structure of the system, high level of abstraction,

2: Class diagram is a description of the structure of specific modules, the level of abstraction is general,

3: Object graph describes the concrete module implementation, the level of abstraction is lower.

In some literature books, these nine models are divided into three categories:

Structural classification, dynamic behavior, and Model Management:

1: Structural classifications include use case diagrams, class diagrams, Object graphs, component diagrams, and deployment diagrams.

2: Dynamic behavior includes state, activity, sequence, and collaboration diagrams,

3: Model Management contains class diagrams.

Drawing InstructionsUML (Unified Modeling Language): is a language for object-oriented visual modeling. Is the further modeling of the design of the E-r diagram (Entity-contact diagram) in the database design process.
There are 3 building blocks in UML: things, relationships, and graphs, and things are abstractions of the most representative components of the model; relationships are the things that bind together; the graphs gather the relevant things. The specific relationship icons are as follows:
Description
A component thing is a noun and a static part of a model.
A behavioral thing is a dynamic part that represents a behavior.
Grouping things is part of the organization.
Note that things are part of the explanation. Dependence: A change in one thing can cause another to change.
Aggregation: A special association that describes the combined relationship of a whole and a part.
Generalization: is a special and general relationship, such as child elements (special) and parent elements (general), with arrows pointing to the parent element.
Implementation: A relationship between classes, in which a class element specifies a contract that is guaranteed to be executed by another class element. Generally used between interfaces and implementations of their classes or between use cases and the collaboration that implements them. UML provides 9 views: Class Diagram, object graph, use case diagram, sequence diagram, collaboration diagram, State diagram, Activity diagram, Component diagram and deployment diagram.
There are three main models in the development of UML systems:
Functional Model: Displays the function of the system from the user's point of view, including the use case diagram.
Object model: The structure and foundation of the system, including the class diagram, are presented by the concept of object, attribute, operation and association.
Dynamic model: Shows the internal behavior of the system. Includes sequence diagram, activity diagram, State diagram.
The following are specific instructions:
1. Class diagram: Describes a set of objects, interfaces, collaboration and other things between the relationship. The following image (from the network): note: #表示protected, + indicates that public,-represents private

2. Object graph: Describes the relationship between a set of objects, is a concrete property value and behavior of a specific thing, it is a class diagram of the object of the instance of the static snapshot, and the main difference between the class diagram is an abstract, and the object graph is specific. The following image (from the network):
3. Use case diagram: Describes a set of use cases, participants, and their relationships, and shows the externally visible services that the system provides in its outer environment. The following image (from the network):
4. Interaction diagram: Including sequence diagram (sequence diagram) and collaboration diagram, the two correspond, the sequence diagram is to emphasize the message time sequence, has the object lifeline and the control focus. A collaboration diagram is an organization that emphasizes the structure of objects that receive and send messages, with paths and sequential numbers. The following image (from the network): Sequence diagram:5. Collaboration diagram:
6. State diagram: Shows a state machine consisting of States, transformations, events, and activities. Emphasize the order of event behavior. The following image (from the network):
7. Activity diagram: A special state diagram that implements the flow of activity to another activity. The following image (from the network):
8. Component Figure 9. Deployment diagram: A component diagram shows the organization and dependencies between a set of artifacts and is presented as a global model. The deployment diagram is the configuration of the component and describes how the system is deployed on the hardware. The following image (from the network):

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.