Pregunta

I want to be able to create UML diagrams from source code - and I found UMMF - UML Meta-Model Framework. However, I could not find any tutorial to get me started on creating a diagram with two classes and a simple relationship between them.

Basically what I am trying to achieve for now, is to create a simple two tables diagram in a relation of 1..n:

two tables diagram to realize with perl UMMF

The XMI output for this diagram, is pretty verbose, because I created the diagram with Enterprise Architect - you can find this XMI file here (I could not embed the text here because is too big)

I want to use UMMF because it creates XMI files, based on perl object hierarchies that are related to OMG UML standards and those files can be imported in any modelling tool that implement those standard.

So the question is, how can I create this diagram using UMMF? - it is not necessary to be that complex.

I need the diagram to have:

  • two tables
  • at least one table to have:
    • one field as primary key
    • one indexed field
    • one regular field (not indexed)
  • a relation between the two tables

Also if you know of the existence of any good Perl UMMF tutorials, please show us their links

¿Fue útil?

Solución

UML::Class::Simple can create XMI files from source code. That may be a good starting point.

Otros consejos

You can use UMMF to programmatically create UML models from Perl and export them to XMI. However, UMMF only supports UML 1.5 -- a standard graphical diagram meta-model didn't exist until UML 2.0 AFAIK.

You might want to look at Graphvis: http://www.graphviz.org/

I've done some basic stuff to create UML-like diagrams with it. It has some basic support for record-oriented diagrams.

Someone could probably write a XMI->Graphvis transformer using UMMF. :)

BTW: I'm the author of UMMF.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top