Diagrams created using Mermaid, modeling portions of Microsoft Bot Framework.
Clone of diagram from documentation on How bots work.
Note: I'm not quite sure why default styling made this diagram so GIANT, but at least with Mermaid you have the option of tinkering around with styling of your sequence diagrams, if your heart so desired.
Clone of diagram from documentation on Managing state.
This diagram illustrates parts of the interaction sequence between these layers, with the solid arrows representing a method call, and the dashed arrows representing the response (with or without a return value).
Abbreviated work by only showing details of NumberPrompt class out of the subclasses of Prompt class.
-
In VS Code, created md file to write the Mermaid code for the graphs
- Made sure to use Mermaid extension that would render graphs in VS Code to preview md while building the models
-
Went to Mermaid's live editor to create SVGs of the models coded up in VS Code
- Note: should dig into using mermaid CLI to generate svg/png/pdf files
- after digging, looks like mermaid.cli is very easy to use:
- put mermaid text into mmd file
npm i mermaid.cli
mmdc -i input.mmd -o output.svg
- after digging, looks like mermaid.cli is very easy to use:
- Note: should dig into using mermaid CLI to generate svg/png/pdf files
-
Included SVGs in GH repo to refer to in README
- Mermaid is text-based
- Allows you to write inside Markdown fenced code block, using Markdown-like syntax to create diagrams
- From the Mermaid syntax, you can then create svg, png, or pdf files
- (The sort of good): GitHub-friendly, because the file types you can create from Mermaid can play nicely with GitHub
- From their GH
"The most exciting use of technology" - JS Open Source Awards (2019)
- Open Source with 116 contributors
- To compare, botbuilder-dotnet has 114 contributors (11/27/19)
- Not directly GitHub-friendly
- GH does not directly render Mermaid syntax into graphs
- Whereas other sites like GitLab do have Mermaid baked-in
- In turn, cannot directly edit diagrams on GH
- GH does not directly render Mermaid syntax into graphs
- (The maybe bad): when you want to create a structural model, Mermaid is a bit more limited in how much detail you can put in
- Asynchronicity?
- Denoting types?
- Abstract methods?
- Optional parameter?