In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces how to draw a neat UML diagram, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Draw a neat UML diagram
Whether you like it or not, software diagrams such as the Unified Modeling language (UML) class model and use case model tend to judge whether they are good or bad by their appearance. Neat-looking pictures are more likely to be popular with readers, often your users or senior managers, than messy-looking ones.
I would like to describe a few important rules of thumb that will enable you to do better than other modeling colleagues. These simple but critical suggestions focus on how to arrange the boxes and lines that make up software diagrams, including UML class models, use-case models, and even persistent models, and therefore apply to all kinds of diagrams.
To draw a neat-looking UML diagram, you should avoid:
Boxes of different sizes of ●
● diagonal
● crossing line
● curve
The messy picture of ●
Unnecessary details of ●
Let's start with an example. In figures 1 and 2, you can see two diagrams drawn in two different styles. * one is complex and disorganized, while the second one is simple and well organized (though a little boring). Which design do you think is better? Most people would agree that the second looks better, because although the two designs are functionally equal, the second is cleaner.
Figure 1, figure 2, figure 3.
Avoid boxes of different sizes
How can figure 1 be improved? First, make sure that all the boxes are the same size. Large boxes look more important than small ones, and if that's what you're trying to say, that's the right thing to do-- but if it's up to me, I'd rather keep all the boxes the same size. This approach works best for "UML use case" diagrams, where all use case boxes and actor symbols can be easily unified, as well as for "UML collaboration diagrams,"UML sequence diagrams," and "UML user interface flowcharts." For diagrams that contain different amounts of information, such as "UML class diagrams" (in which individual classes have a varying number of attributes and operations), or "UML state diagrams" and "persistent" (data) models, there are some difficulties.
Avoid diagonals
Another difference between figure 2 and figure 1 is that it does not have any diagonals. I eliminate diagonals by rearranging the boxes as if they were on a grid, separating the interconnected boxes either vertically or horizontally. Visually, most people are more interested in straight lines.
Avoid crossing lines
In figure 1, there are two lines crossing each other, and one of my general rules of thumb is to minimize the number of crossing lines in the diagram. By moving some boxes to the side, I can avoid crossing the two lines in a short period of time. Unfortunately, you're not always so lucky-you can't always avoid crossing lines. In figure 3, I want to join all five boxes together, but I can't do this without intersecting at least two lines. As you can see, I have no other way to connect boxes 3 and 5. When I have to cross the line, I mark it with the standard applicable to the circuit diagram: one line "skips" the other, as shown in figure 4. The advantage of skipping is that it makes it clear that the lines just cross on the diagram and are not connected in any way.
Avoid curve
As you can see in figure 5, I have made a further improvement to figure 4 by removing the curve. People like to see straight lines that are vertical or horizontal. This time I pretended to draw UML diagrams on the grid (in fact, this is a built-in feature of many computer-aided systems engineering (CASE) tools), and then I just needed to draw boxes and lines as I did on the grid.
Figure 4, figure 5.
Avoid confusing or complex UML diagrams
A picture that shows too much detail or looks messy doesn't look good. * you can have several pictures that show various levels of detail, rather than a complex picture showing everything. This is one of the reasons why UML has several diagrams: a software is so complex that we can't model all its aspects on a single diagram. Also, UML allows you to add packages to the diagram (next week's tip topic).
Another related consideration is the use of the screen or page area. In my opinion, a picture that takes up a few pages is much better than a picture that curls everything together so that it can be printed on one page. You should leave enough space for the diagram to make it easy to understand.
Avoid wasting too much time on beautifying UML diagrams
Although these rules of thumb are very effective, endlessly adjusting the appearance of the diagram always adds extra modeling time. One way to solve this problem is to try to keep the appearance of the diagram at a roughly good level-you don't need it very much when you use it. Once you are sure that the diagram models the application the way you want, you can start moving the box to avoid crossing lines and improve its understandability.
Your main goal is to model the system, not to draw beautiful diagrams. It is important to point out that these important rules of thumb can also be used to beautify poor design. For example, I can start with figure 2 and rearrange it into figure 1 to make the design look more complex than it really is-- maybe convince senior managers that I need more time or resources to get the job done. or guide them to avoid alternative designs that I don't particularly like. Assuming that your motivation changes according to the situation, I hope you are in a healthy situation, and the most important thing you consider is to make great designs look more attractive, not to survive in office politics.
Thank you for reading this article carefully. I hope the article "how to draw a neat UML Diagram" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.