2 ms·
The 3 actually useful diagrams that I have seen in the last 10 years are: - Sequence - Entity relationship - State chart All 3 are useful for communicating
by sly010 10y ago
The 3 actually useful diagrams that I have seen in the last 10 years are:
- Sequence
- Entity relationship
- State chart
All 3 are useful for communicating protocols, schemas and state charts.
Sequence diagrams are probably the most ubiquitous, and very useful in explaining protocols. Even RFC-s have them.
Relationship diagrams are often (ab)used to visualize relationships between tables in SQL databases. While it's not very useful for designing, I have actually used them for understanding and simplifying a complicated database schema.
I actually believe every API documentation should start with an abstract entity relationship diagram. Abstract in the sense that it should not necessarily represent physical tables, but give an overview of the underlying structure to the first time user. Doesn't even have to complete or correct.
State charts are occasionally useful for obvious reasons. Try explaining TCP without one.
I think it's worth noting that the above 3 existed before UML and UML merely tried to formalize them, so while I don't think anyone uses "UML" anymore,
being able to comprehend the above 3 charts is as basic of a skill as being able to read pseudo-code, and saying they are not is use would also be false.
Edit: formatting
- jackweirdy 10y agoThe reward of the clarity of sequence diagrams is worth the pain and boredom of learning all the others at university. Sequence diagrams nicely represent separate entities involved in a system, the order of communication between them, and the conceptual content of messages between them. Even briefly reading a sequence diagram helps you understand how different components relate to each other. Often, and usually with API endpoints with some complexity behind the scenes, I'll go out of my way to draw an ASCII sequence diagram with Monodraw[0] and leave it in the comments or a readme. [0] https://monodraw.helftone.com https://monodraw.helftone.com
- Blatorg 10y agoActually, ERD are not specifically supported by base UML, but an approximation can be done using class diagraams and, with a little specialization (profile) the rest of ERD can be represented.