In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what problems should be avoided when drawing UML diagrams, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
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 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 UML 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. "cluttered" diagram
Figure 2 "neat" map content navigation
1. Avoid boxes of different sizes when drawing UML diagrams
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.
two。 Diagonals should be avoided in drawing UML diagram
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.
3. Crossing lines should be avoided in drawing UML diagram
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.
Figure 3. How do I connect 3 and 5 without crossing lines?
Figure 4. One line "jumps" over another content navigation
4. Curve should be avoided in drawing UML diagram
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 be drawing on the grid (which is actually 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 5. A cleaner version of figure 4
5. Drawing UML diagrams should avoid confusing or complicated 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.
6. Drawing UML diagrams should avoid wasting too much time on the beautification of 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.
These are all the contents of this article entitled "what are the problems you should avoid when drawing UML diagrams?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.