Live data from Hacker News

The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

jessems.com

21–30 of 113 posts

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#21

I have used Mermaid diagrams quite a bit lately because ChatGPT can generate them. It's been an easy way to get it to visualize things before I have access to the image generation stuff. It works really well, try it if you haven't! I only wish the renderer could render "sketch" style like Excalidraw, I don't like the default appearance. Obviously a small detail, though.

Have you tried templates?

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#23
post #15

The article claims that sequence charts are the only useful thing in UML. What about: Entity diagrams, especially for database ERD Timing diagrams (think: Gantt) Interaction/flow diagrams Use case diagrams

Agreed. I'd also add deployment diagrams[0] to the "pretty darn useful" list.

0 - https://www.uml-diagrams.org/deployment-diagrams.html

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#24
I prefer D2 lang over MermaidJS for diagrams because the diagrams just "look" better and you have more ability to customise the look. And after all if the purpose is visualisation the visual matter.

(Shameless plug: Intro to D2 https://victorbjorklund.com/build-diagrams-as-code-with-d2-d... )

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#26

I can highly recommend PlantUML as a simple language for creating sequence diagrams. It also supports other UML diagram types, which, despite what the article says, are also useful sometimes (so long as you don't worry about every last silly detail that's specified in the standard). @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice…

Checkout kroki as well which is collection of various tools including plantuml, tikz, mermaidjs, graphvi etc.

As a bonus, niolesk is a very good frontend on top of kroki. You get an editable link of your diagram which you can share with teammates.

You can find docker image on github running kroki and niolesk.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#27
post #15

The article claims that sequence charts are the only useful thing in UML. What about: Entity diagrams, especially for database ERD Timing diagrams (think: Gantt) Interaction/flow diagrams Use case diagrams

I've gotten some mileage out of the PlantUML JSON visualization, as well as the REGEX graph, gantt, salt, and wbs for org charts.

XEARTH is also pretty neat, if you don't want to bring in a full mapping API just to show a point on a map. I realize it's a pretty crappy map in XEARTH, but the point is, I don't always need a good map.

Mermaid's nice though. I love the git graph - I use that thing every day. If I'm not dealing with ITAR data I just render everything remote through the kroki service, and take what I need from each graph spec.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#28
post #22

i love mermaid but i find sequence diagrams too thin on information, a graph view always feels like the right amount of data

Please elaborate. The amount of information provided is up to the creator of the diagram...

Not the OP, but sequence diagrams show individual scenarios, by definition. And there can be a lot of scenarios in a complex system. Thousands, perhaps.

Relation (box-and-line) diagrams show the static relations between resources in a system, not individual scenarios. This typically gives a better overview.

Long story short, you need both. If you want the long story, I wrote (a lot) on this a couple of years back: https://www.ilograph.com/blog/posts/the-two-fundamental-type...

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#29
I wish there were a CL/Clojure alternative to MermaidJS with a predictable interface so I could build diagrams at the REPL avoid searching/remembering what weird DSL to use when making diagrams. MermaidJS does seem to be a solid tool though. I use Omnigraffle when I want more control over the result.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#30

I can highly recommend PlantUML as a simple language for creating sequence diagrams. It also supports other UML diagram types, which, despite what the article says, are also useful sometimes (so long as you don't worry about every last silly detail that's specified in the standard). @startuml Alice -> Bob: Authentication Request Bob --> Alice: Authentication Response Alice -> Bob: Another authentication Request Alice…

I believe PlantUML was basically the inspiration for MermaidJS. A huge advantage of MermaidJS is that it can run in the browser, though.
Post reply on HN