1
votes

I usually document system architectures with traditional UML class diagrams, and then further document the most important/complex code paths with arrows from one method to another, and which property it updates, etc. Usually with little notes of the arguments used and values set.

something like (horrible ascii art warning)

              --------------            
CASE X        | main class |            -----------------
              --------------            | util          |
              | count      |<-+1        -----------------
              --------------   |        -----------------
user ---x=A-->| doStuff(x) | ---y=Z---<>| someMath(x,y) |
              | other()    |            -----------------
              --------------            

is there a name for such a thing? note how i'm pointing to individual methods/properties, not to whole classes as a traditional UML diagram would.

I use graphviz/dot for all my other graphs. but i can easily move to something else that allows me to do that... i just rather it be programatical like graphviz, not a drawing tool like visio if possible.

Please, feel free to edit to add tags if you think some other graph engine may provide this.

2

2 Answers

2
votes
  1. No, there is no name for such thing in the UML world. Although in UML you can draw diagrams combining various drawing elements nearly at will and thus producing a new inventions it, your drawing does not fall into the UML standard.

    A very big advantage of using standard is that other people can understand what you mean without the need to provide them some reading instructions.

  2. In UML there is whole set of "traditional UML diagrams" categorized as "Behavior Diagram". You may want to go through the examples in Kirill Fakhroutdinov's online book http://www.uml-diagrams.org/index-examples.html

    UML Sequence Diagram (in your case) seems to be the first thing to play with.

  3. In UML using drawing tools to produce some picture may be the poor-man's choice, but you'd have to study hard to make sure that you put the picture right.

    Instead of using a picture drawing tools, we rather use UML Modeling tools which support the drawing-right and they sort of "know" what the picture shows and can generate code from the UML model (e.g. hierarchical state machines) or can reverse engineer a source code into an UML model.

    Furthermore the UML model format was standardized as XML Metadata Interchange (*.XMI) and once you have model in this format you can use various tools to round-trip and produce artifacts (generated documentation, generated code, ...) that you need

0
votes

As xmojmr has said, you ought to look at sequence diagrams. UML breaks itself into structural and behavioral diagrams. You probably shouldn't add behavioral elements into a structural diagram (which is what you are doing). Your explanation of why you are doing what you are doing is exactly the sort of explanation that people give for the use of sequence diagrams: they're a way of documenting paths through your code.

You'll also find that they are used to document paths through use cases (a "use case scenario" is a path through a use case), so keep in mind that class diagrams represent the structure of use cases. In other words, they all go together, but you're likely to see a lot of sequence diagrams that have been worked out from use cases rather than class diagrams. I wanted to point this out so you don't get confused by the apparent orientation of sequence diagrams and use case diagrams.