clue / graph-uml

UML class diagrams in PHP
23 stars 6 forks source link

String im/exporter for yuml.me ? #11

Open clemens-tolboom opened 10 years ago

clemens-tolboom commented 10 years ago

I just learn from http://yuml.me/ which has a textual input format much richer then http://en.wikipedia.org/wiki/Trivial_Graph_Format

I put this in here as yuml has class / activity and use case diagrams. So it fits more here then in graph where we have https://github.com/clue/graph/blob/master/lib/Fhaculty/Graph/Exporter/TrivialGraphFormat.php

I like esp. the text formats used like done in http://yuml.me/diagram/nofunky/class/draw

[Customer]<>-orders*>[Order] [Order]++-0..*>[LineItem] [Order]-[note:Aggregate root.]

clue commented 10 years ago

Certainly looks interesting! :+1:

A quick search also revealed https://github.com/aivarsk/scruffy (python implementation).

Why is the https://github.com/clue/graph/blob/master/lib/Fhaculty/Graph/Exporter/TrivialGraphFormat.php not in this package?

TGF is really more a general purpose graphing format, whereas yuml is a more a textual representation of UML diagrams.

How hard is it to build a importer?

Probably not too easy :) We might want to start by supporting just a subset of its features, like really simple graphs. Also, this library currently uses PHP's reflection system for each classname, so we'd have to decide on whether we want the imported classes to be reflected at all (off hand I think we might not).

An exporter?

Just a textual exporter would likely be much easier.

Is graphviz capable enough to render?

To render exactly what? :) Assuming we'd eventually have an importer and an exporter, we could simply make sure we transform it to our current reflection structure and then pipe it through graphviz. The linked package also shows how GraphViz is capable of handling the scruffy style.

Am I?

Let's see what you come up with :)

clemens-tolboom commented 10 years ago

What I like about yuml is their visual appealing representations. It looks like graphviz output but how did they manage.

Thanks for the links and answers.

I do not assign to me yet. Let's see for others to jump in.