Replies: 5 comments 6 replies
-
If all diagrams that use a graph like flowcharts/state diagrams, class diagrams etc would generate a layout object of the same type when performing the layout algorithm, we could use the same rendering logic everywhere. The difference would be different shapes/styling of edges etc. This is something we should work on (in the roadmap). The other aspect is regarding syntax. My main though here is that if can make one diagram you should not need to relearn everything for next one. This becomes more and more important the more diagrams we add. We have some diagrams that has been created in the project like for instance flowcharts. For others diagrams we have tried to re-use PlantUML syntax to make it easier for authors. My latest thoughts here would try to end the duality be to make a common UML syntax. Note though that when it comes to syntax we are very restrictive. Once it has been released ... it is there. You can expect some developer integrating mermaid to a website to cope with breaking changes when updating mermaid. A very different story with diagram authors. We can not expect them to go back and update the documentation already written this means that the syntax once it is released is fixed. One example of an early mistake ;) Legacy syntax:
The more readable syntax:
We still support both. |
Beta Was this translation helpful? Give feedback.
-
Some examples that should be the same everywhere:
|
Beta Was this translation helpful? Give feedback.
-
From my perspective, although UML is a standard and well defined, it is not a best choice because its notation complexity and variety is half way between bash and makefile. It takes a considerable amount of time to memorize all this symbols and not using all of them quite often forces a user to constantly check their meaning. Lets have a look at it:
These are different shapes. I can accept arrow operator Another example, ask anyone who is not very familiar with it, what does it mean
In that one example, which is supposed to be a simple one, they replaced human readable words with some obscure notations and eventually a user ends up referring to their documentation. Whereas any translator will help you with plain English. And if you, esteemed reader, got to this point, now, without looking at the previous answers, test yourself, say what diagram would it be and what does it represent:
The answer is that I believe initial intentions of PlantUML developers were good but they ended up in a sort of language that is not readable at all and you can only handle it through WYSIWYG editor. It must be treated as internal format only. Perhaps we can support Plan UML simply as one of the possible notations, but not as a standard |
Beta Was this translation helpful? Give feedback.
-
Chiming in here: Be sure that whatever syntax is adopted/evolved, it can be parsed by a lexer-parser (as is being done now across all the diagrams/charts). It must have a well-defined grammar. I point this out because the syntax PlantUML is a mess; don't want to end up like that. That's also why I agree with @nirname : It'd be fine to support PlantUML if wanted, but Mermaid should not use it as a basis. |
Beta Was this translation helpful? Give feedback.
-
Sidenote:I think that the references to "UML" in this discussion all really refer to PlantUML . (Fun fact: I started with OO in the late 80s and watched the UML develop.) |
Beta Was this translation helpful? Give feedback.
-
While developing new diagram, I noticed that there are plenty of things, that can be done based on the same syntax. All the diagrams are data driven, so that is not really important what the source of data is, more important that it is structured one. Having looked at Excel, you may notice that table representation is almost always fulfill the purpose. So there is not so much difference between:
Because all of them represent the same idea - proportion.
We can assert the same thing about the majority of all node-links graphs (with some assumptions), like:
...and many others.
So the only difference is layout algorithm + some attributes and verifications.
Is it possible to support some universal languages or formats like
dot
,csv
, or maybe a custom one, and specify data format and layout algorithm independently?Beta Was this translation helpful? Give feedback.
All reactions