Using GraphViz for UML Diagrams

(Andy Wootton) #1

I can’t decide if this is awesome or insane. This add-on for the GraphViz ‘command-line graphics’ tool allows you to write a textual definition of UML diagrams.

Ooh, hang on… is this a short-cut to my UML use-case diagram to user-story translator? Sadly, not from the .XMI files that come out of a ‘real’ UML tool.

(Andy Wootton) #2

I’ve been thinking about this and it may not be as silly as it seems. It doesn’t take long to draw a simple UML diagram from a GUI but as it gets more complex and you start to run short of space, the time you spend shuffling things around to make room and keep things legible grows exponentially.

Like any text to tool-chain solution, perhaps the high initial cost is recovered later in the process. Plus, you could quickly hack a new diagram from an earlier template and change-control the source.

(Andy Wootton) #3

I just found this web interface for
Copy this into the box to see a simple directed graph

digraph {
A -> B;

(Steve Pitchford) #4

Could one do soemthing with IBM’s node red?

(Andy Wootton) #5

Maybe, though that looks like a specific use of directed graphs, whereas Graphviz is a generic tool. As @LimeBlast’s ERD example shows above, there may be something like Graphviz behind the scenes.

It’s a bit of a toss-up between the manual layout of vector graphics programs to maximise control and auto-layout to free you to think more abstractly and let the system make unplanned connections. Ideally you’d be able to switch between the two but that sounds non-trivial. It’s like the dream of graphical code design where you can start with either a diagram or code.

(Steve Pitchford) #6

I see demos of graphical code design from time to time. Whilst the layout engine gets better, I’ve yet to see a meaningful demo where a text box doesn’t pop up and people get dirty under the hood.

At one company I worked on a system which would take entity descriptions in xml as input, and from that build database access code, RPC interfaces and GUIs out of the box. It was a richer entity description language than SQL which made for a richer experience than the SQL derived toolkits that popup from time to time.

(Andy Wootton) #7

Look what popped up again in the clojure-toolbox lein-plantuml