Or this one, from a service I worked on a couple of years ago:
sequenceDiagram
Title: Service Signup
autonumber
User ->> App: User enters email address and password
App ->> Server: Makes API call to register the user
alt is not registered or already registered
Server ->> App: Sends a token for authenticated API calls
App ->> App: Generates unique ID
App ->> Server: Makes API call to link user's account with unique ID
else some other error
Server ->> App: Returns [TODO: add error cases here] error
App ->> User: Display error
end
I hated drawing diagrams with a mouse, but when I found mermaid, I started using sequence diagrams everywhere.
> Diagrams are low value window dressing.
It's about communication, as the article said. The people who needs the diagrams the most are often not tech-savvy.
I've used mermaid and lots of other tools. Mermaid is my quick and dirty tool of choice lately, actually. I sank a lot of time in using mermaid to get some sequence diagrams. They suck both visually and the process of creating them is also terrible. But it gets the job done as far as ass-coverage is concerned.
The example above tells me that you have a bog standard login thingy that behaves exactly like a login thingy should work (no surprises there). A great way to fluff up some document where you state that your login thingy should be a thing in your thing. Great example of why diagrams are a waste of time. There is zero useful/surprising information in there. Plenty of things I would challenge though. Why does the app have to generate the id for example? What's wrong with the email address as an id?
So not only is it uninformative, it's probably wrong.
> Great example of why diagrams are a waste of time.
I need something for the tech people, and I need something for the money people.
The diagram gives my target audience (again, non-tech people) an overview of the system. There were sequence diagrams for all the functionality we wrote code for. Technical specs and documentation were also written up, but the money people won't bother to wade through that to understand how it works; the dev team can read that.
> Why does the app have to generate the id for example? What's wrong with the email address as an id?
The example was extracted from a project I worked on a couple of years ago. I obfuscated what the "id" field is on purpose. If it helps, think of it as the unique device identifier used to send push notifications.
> So not only is it uninformative, it's probably wrong.
Have you tried mermaidjs? It's probably related to mermaidchart.com -- I don't know. The first sequence diagram in the article boils down to this:
with a fancier image for the customer than a box. Try it out at https://mermaid.live (linked from https://mermaid.js.org/)Or this one, from a service I worked on a couple of years ago:
I hated drawing diagrams with a mouse, but when I found mermaid, I started using sequence diagrams everywhere.> Diagrams are low value window dressing.
It's about communication, as the article said. The people who needs the diagrams the most are often not tech-savvy.