Live data from Hacker News

The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

jessems.com

41–50 of 113 posts

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#43
I guess it’s effective because it is similar to Markdown and other lightweight stuff: things like bullet items are just written like bullet items, with hyphens (or similar). You write it how you want it to be displayed. Granted for a diagram it’s more complicated since it’s a graph and not a tree, and you write it with declarative arrows rather than as ASCII art, but perhaps that in practice strikes a nice balance between being non-finicky and at the same being simple enough (syntax-wise) in order to deal with.

That aside the “unreasonable effectiveness” allusion to “The Unreasonable Effectiveness of Mathematics in the Natural Sciences” is clearly overwrought. Let’s not get ahead of ourselves.

> Reaching for code to solve my code problem seemed like something that would only appeal to someone that loves code so much that they're probably no good at visualizing.

It looks more like a pseudo-markup to me.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#44
post #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.

I came to say the same thing; kroki is the powertool of choice in this space.

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#45

MermaidJS is fantastic. I love that github has integrated it, but I wish they would update so that the markdown-in-mermaid support worked. If you agree, say so on the issue I posted: https://github.com/orgs/community/discussions/61266

Forgejo [0] (and Gitea) have also implemented it. Or more accurate to say, they use Goldmark markdown parser and the Mermaid extension [1].

[0] https://forgejo.org

[1] https://github.com/abhinav/goldmark-mermaid

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#46
post #28
post #22

Earlier quoted context omitted.

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: ht…

- Thanks for the details and resources. Where is the "graph" in the post? When someone says graph I usually think of a pretty basic thing with nodes and edges.

- What're your thoughts on C4?

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#48
post #18

I really like using Mermaid to create state diagrams. I'd been looking for a tool like it for quite some time, and I think it slipped under my radar because it's more focused on sequence / flow diagrams and doesn't hype its state diagram capabilities as much. Using a text-based tool for this is so much better than my previous workflow of Visio or Powerpoint.

Have you seen xstate's visualizer? https://xstate.js.org/viz/

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#49
post #3

I really, _really_ wish I could generate SVGs of these without JavaScript and a headless browser.

D2 lang ( https://d2lang.com ) can do that. My guide: https://victorbjorklund.com/build-diagrams-as-code-with-d2-d...

Curious if anyone has experience with large diagrams (100K+ elements) using D2 or something similar?

Re: The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS

#50

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've used PlantUML. It's very nice.

However, it gets to be difficult to use if you've got complicated scenarios. It's very difficult to depict parallelism with PlantUML.

Post reply on HN