5 ms·
I work with non-distributed (ish) systems, and I use watered down class diagrams much more often than sequence diagrams. But even when I was working on more di
by tonnydourado 3y ago
I work with non-distributed (ish) systems, and I use watered down class diagrams much more often than sequence diagrams.
But even when I was working on more distributed systems, I found more value in state machines and simplified class diagrams, actually. I think most cases where you're using a sequence diagram, a state machine is a better tool. Both for thought, and for implementation. Surfacing implicit state machines can require some extra upfront design, but if you have a non-trivial amount of states, it's pretty much guaranteed to be worth it.
- knsv 3y agoThe problem with state machines that I run into often when using them, is "multi-dimensional" states. When managing to get that right they are great, otherwise you get loads of edges...
- sidpatil 3y agoI'm not sure what you mean by "multi-dimensional" states. Is it something that statecharts [1] can help with? [1] https://statecharts.dev/ https://statecharts.dev/
- barrkel 3y agoThe cross product of multiple state machines, I expect. If you try and use a single state diagram to encode the product of states, everything multiplies.
- michaelsbradley 3y agoThat’s where statecharts can help.
- RossBencina 3y agoUML Statecharts are Harel Statecharts, which are hierarchical state machines. Described here: Statecharts - A visual formalism for complex systems. David Harel. 1987 https://archive.org/details/7.-statecharts https://archive.org/details/7.-statecharts Looks like you can also freely download the paper from here: https://www.sciencedirect.com/science/article/pii/0167642387900359 https://www.sciencedirect.com/science/article/pii/0167642387...
- tonnydourado 3y agoNot sure what you mean by multidimensional states?
- hwayne 3y agoThe car can be in drive, neutral, or reverse, the light can be red, green, yellow, or broken, the seatbelt can be off or on. That's 24 states.
- tonnydourado 3y agoAh, ok. That's kind of what I meant by upfront design, though. Yeah, mapping this out is gonna suck, but it's better than having it hidden in a bunch of ifs.