Sequence of diagrams in UML

Source: Internet
Author: User

Above: UML from requirement to design -- use case


From the beginning to the present, I have gained a more in-depth understanding of UML. At the beginning, I always felt that UML is a diagram. When I mentioned UML, I thought it was a painting thing.

What are these images? Why are these images? In a project, the figure first appeared. What is the sequence of these images? The brain is still confused.

I will explain it with my own understanding.

UML is composed of views, diagrams, model elements, and general mechanisms.

I. View: The view can be divided into use case view, design view, process view, implementation view, and configuration view.

Ii. diagram: The diagram includes

Use case diagram,

Static graph (class graph, object graph, package graph ),

Behavior diagram (status diagram, activity diagram ),

Interaction diagram (sequence diagram, collaboration diagram)

Implementation diagram (Component diagram, configuration diagram)

Iii. Model

A model is a "cell" in UML and is the same as an element that forms UML. model elements include: classes, objects, relationships, messages, etc.

Iv. General mechanism:

Other information of UML, such as comments and some extension mechanisms, such as UML-based labels and constraints.

Do you see the first and second ones? Is it a bit blind? Are they not talking about the same thing? Are they not all pictures? We usually talk about the second one, so we ignore the first one.

In fact, a view is a general concept. A view is composed of multiple graphs. It is like the relationship between Asia and countries. Asia includes many countries, but not all countries belong to Asia.

Splitting a chart into a view better reflects the system formation process to a certain extent.

The process is as follows:

1: Use Case view: In the process of system formation, the use case diagram is first generated. this is a summary of the customer requirements of the system analysts. generated in the demand analysis phase. with the use case diagram, the following views are available.

2: The use case diagram is complete. What image will be generated next? My own understanding is the package diagram. with the use case, you enter the outline design stage. this stage solves the basic architecture of the system. that is, the hierarchy of the system (this is popular in OOD ). each layer is basically your package. each layer is divided into one package.

For example, in the typical MVC mode, ui bll Dal entity is a typical package. The next step is to analyze each layer.

3: after the package diagram is completed, the overall architecture of the system will come out. The next step is the class diagram, which is the key part of the system. A class chart is generally mapped to the entity layer of the database. Then find the ing at each layer. At last, adjust the class chart at each layer by using the relevant pattern. Make the system maintainability and scalability meet better requirements. For example, the classic factory mode and appearance mode.

4: when the class diagram is finished, What diagram will be generated at this time? The most appropriate is the system's implementation view and configuration attempt. In fact, after the package is completed. The system component diagram should come out. Each package should be a layer. On the. NET platform. Each package is an independent DLL file for other programs to call. This is the component in our component diagram. With the addition of databases and some user-required devices, the component diagram is displayed.

The configuration diagram only has more physical architecture than the component diagram. In fact, the physical structure has been determined at the requirement analysis stage.

5: the basic structure and module of the system. After the class is determined. The next step is to compare the specific implementation process of each use case. This is the sequence chart. The sequence diagram is also important in UML. Sequence diagram, use case diagram, and class diagram are considered as the core view of UML. The time sequence diagram is close to the code. The sequence chart and co-drawing can be easily converted. Just click it and you will be OK (You know ). After the sequence diagram is completed, the system will basically come out.

6: some other views, such as activity charts and status charts. I personally think it is not very functional. For large systems. It is better to use them to analyze the system process before drawing the sequence diagram. But they give people a sense of process-oriented.

Of course, other elements of UML are always used in the drawing process. For example, we need to add comments and messages transmitted in the sequence diagram when drawing a picture.

Finally, I would like to raise a point. Here I use the familiar rose to describe UML. Other tools, such as the PD with the same name as it, also provide these functions. Only focus on it. Rose is a face object, and then develops to database modeling. PD is the opposite of it.

There are also many advanced features we are looking forward to using and discovering.

 

Next: UML from requirement to implementation-package diagram

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.