clue / graph-uml

UML class diagrams in PHP
23 stars 6 forks source link

Use GraphViz HTML-Like Labels instead of record shapes #5

Open clue opened 11 years ago

clue commented 11 years ago

http://www.graphviz.org/doc/info/shapes.html#html

clemens-tolboom commented 10 years ago

Please elaborate on the why?

I changed the title as it is HTML-Like Labels which is one of my reasons not to use it as people might expect it may contain any HTML. But it does not :(

OTOH people can actually write a label like this. Which would be awesome.

I guess we should look for a library understanding this HTML subset.

clue commented 10 years ago

Please elaborate on the why?

GraphViz record structures are somewhat limited, as there's no way to use an italic font (used for abstract methods/classes) or underlines (used for static members) etc. Also, this would allow us to apply more styles to the class diagram, like assigning background colors or coloring the method and attribute names.

I changed the title as it is HTML-Like Labels [...]

Yeah, makes sense :)

I guess we should look for a library understanding this HTML subset.

I don't think we necessarily have to be able to "understand" (i.e. parse?) them, we merely should be able to export them :)

clemens-tolboom commented 10 years ago

Support for italic / underline for our digrams sound indeed as a nice feature.

Regarding export ... does that break somehow? Then please add some tasks to this issue.

I'm now curious from my Drupal tooling regarding this label style :)

clue commented 10 years ago

[…] does that break somehow?

I don't think so. Issue #19 mentions the required steps to refactor our existing code into a separate ClassVertexToGraphVizRecord class. Once this lands, we can start working on a ClassVertexToGraphVizHtml.

clemens-tolboom commented 10 years ago

I think I missed the point all together. We want to render output from this lib into nice table form. Sorry for that.

llaville commented 4 years ago

Hello, @clue I like your graphs librairies (graph/). And as I've beginning to write a tools based on new versions (dev master branch of graphp and graphviz), I realized that graph-uml is outdated (not yet migrated).

Rather than submit a PR, I've rebuilt a copy, based on your project. I'm still working on it, and it should be available soon on packagist. You can see architecture as a png image in docs folder of my project : https://github.com/llaville/graph-uml

You'll see that I've introduced the formatter feature to allow either record and html labels.

Tell me what you think about it.

clue commented 4 years ago

@llaville Thanks for working on this, this looks cool!

I'm still planning to update this project, but expect this to take at least a few more months. Perhaps we can join efforts then. Looking forward to see what you come up with in the meantime! :+1:

clemens-tolboom commented 4 years ago

I don't like this 'copy' instead of making a clone which keep the records strait.

llaville commented 4 years ago

@clue Thanks to gave me feedbback so quickly !

@clue and @clemens-tolboom : Of course I'm ready to replace my copy by your own as soon as it will be available with this feature (html-like labels). But until then, I'll continue with my version because I need it now ! Hope you understand.

llaville commented 4 years ago

I've released today version 0.4.0 of my copy of graph-uml (with docs, and beginning of unit tests). But the best to learn in this announcement, is the ability to choose (as previous) between html and record format (for Graphviz), and also ability to decouple code to graphviz attributes with Generator.