Can a sequence diagram realistically capture your logic at the same depth as your code?

I use UML sequence diagrams all the time and I am familiar with UML2 notation.

But I use them only to understand the essence of what I intend to do. In other words, a diagram always exists at the level of abstraction over the actual code. Every time I use them to try to describe exactly what I intend to do, I end up using so much horizontal space and so many alt / loop frames that it’s not worth the effort.

So this is possible in theory, but has anyone really used a chart at this level of detail? If so, can you give an example?

+3
source share
6 answers

I have the same problem, but when I understand that I am going at a low level, I re-read this:

You should use sequence diagrams when you want to look at the behavior of several objects within the same use case. Sequence diagrams are good at demonstrating collaboration between objects; they are not so good at pinpointing behavior.

If you want to look at the behavior of a single object in many use cases, use the state diagram . If you want to look at behavior in many ways, cases or many threads, consider the action diagram .

, CRC-, . CRC- , .

[ UML Distilled book]

+8

. . , (objectA B foo ). . , , . , -.

+4

, .

, (, ).

, , , , .

(.. ), . x , if loop.

, " ", , .

A4/Letter, - . , , 6-10 10-25.

, .

, , , ( , , , , , , ..), , ( )/p >

, , . - , , . (.. ), .

, , . "variable", "current" "previous", , current = current.next = , .

+2

, .. " ". , ...

, - "" , , .

+1

- - , ! , . .

- , , - . - - . . .

"" . UML, UML .. . , , / . , . , , , , .. .

, - . , . , . (, , . ). , , .

Observer. , , . . " " , .

- - , / /​​ .. UML , . usecase Usecase. , .

+1

U.M.L. , .

, , , .

, , , - , .

.

P.D. - - ?

0

Source: https://habr.com/ru/post/1697686/


All Articles