>> > Is there such a thing as a programme that will let me create, let us
>> > say, ten sequence diagrams, and forge from that a single normalised
[quoted text clipped - 16 lines]
> threads of action and have a template code drawn from that? You could
> exapt later it for other uses if need be.
I'm not a UML guru, but I have the feeling that "what is going on" in a
sequence diagram is always clear. For example, when you have an arrow going
from one lifebar to another, what does that mean? Method invocation? TCP/IP
Socket communication? XML SOAP transmission? Inter-thread communication?
What is the significance of the length of the lifebars? How do these two
diagrams differ in semantics?
<diagram A>
[Object 1] [Object 2]
| |
|-| |
| | |-|
| |------->| |
|-| | |
| | |
| |-|
| |
</diagram A>
<diagram B>
[Object 1] [Object 2]
| |
|-| |
| | |-|
| |------->| |
| | | |
| | | |
| | |-|
|-| |
| |
</diagram B>
Furthermore, I believe sequence diagrams are not apt for representing
all the branches when a conditional construct (e.g. if statement) might
appear, or iteration constructos (while loops, for loops, etc.), all of
which are pretty central to the code that actually appears within the
methods.
If all we care about are the existences and signatures of the methods
themselves, a class diagram seems like a more ideal tool for this.
All a sequence diagram buys us is one possible ordering in which the
methods may be invoked, and the only thing we can use that in code
generation is to filling in the body of methods, but like I said, it's not
enough information to actually generate useful method implementations.
- Oliver