Re: Documentation and UML diagrams

From: Date: Fri, 30 May 2003 05:09:27 +0000
Subject: Re: Documentation and UML diagrams
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-16822@lists.php.net to get a copy of this message
Hola Leandro, --- Leandro Lucarella <luca@lucarella.com.ar> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jesus M. Castagnetto, el jueves 29 de mayo a las 19:38 me escribiste: > > I've been playing on my home Linux box with Dia > > (http://www.lysator.liu.se/~alla/dia/) and Autodia > > (http://droogs.org/autodia/index.html), to create UML diagrams from my PHP > code > > and my SQL dbs. > > > > Autodia looks like a nice tool to generate Dia diagrams, see for example a > > (cleaned up) diagram generated by running Autodia on PEAR::Math_Vector at: > > > > http://www.scripps.edu/~jesusmc/stuff/Math_Vector.dia > > > > and as a PNG at: > > > > http://www.scripps.edu/~jesusmc/stuff/Math_Vector.png > > > > I was wondering, given that the XML for Dia is not altogether dreadful, and > > that phpDocumentor (my favorite documentation tool for PHP code), already > groks > > the structure of the code, maybe it will be a nice idea to generate a Dia > > output, basically a similar idea of generating DocBook output, just in this > > case the 'documentation' is an UML diagram. > > Doxygen[1] (and many other programs that generates diagrams) uses > GraphViz[2] to make UML diagrams. Even when the PHP support it's not > the best it's a good tool. BTW, Autodia now generates GraphViz and VCG (http://rw4.cs.uni-sb.de/users/sander/html/gsvcg1.html), and PHP support seems OK so far. Doxygen is nice, but I got used to the javadoc style from writing Java code for mangling protein structures. > If you'r looking for the reverse process (generate code from UML > diagrams) you can try dia2code[3] (I've made a patch for generating PEAR > Coding Standars compatible code that it's now on dia2code) Yep, tried that, and like it. Most of the time I have to document my existing code. But for generating some skeletons for de novo created code, that is useful. > or > Umbrello[4] UML Modeler (that it's much more complete than DIA for UML). > Umbrello can generate PHP code but not PEAR compatible, but there's a > tool similar to dia2code to generate code from an XMI[5] diagram (XMI is > a OMG[6] open XML standard for UML diagrams), the format used by > Umbrello (and ArgoUML, I think). The tool is xmi2code[7] and it's > roundtrip code generator that can update the code too, and it can > generate PEAR compatible code. Indeed, I do have Umbrello and ArgoUML on my machine too ;-). I was not too happy w/ the PHP code from Umbrello, the Java code for that one and ArgoUML seems adequate for de novo code. Apropos, there are several 'dialects' of XMI AFAICT, to the point that there are xmi->xmi converters. Had not tried xmi2code, but usually my problem is the documentation of stuff I wrote some time ago, so I am not sure if I would personally use it much. > [1] http://www.stack.nl/~dimitri/doxygen/ > [2] http://www.research.att.com/sw/tools/graphviz/ > [3] http://dia2code.sourceforge.net/ > [4] http://uml.sourceforge.net/ > [5] http://www.omg.org/technology/documents/formal/xmi.htm > [6] http://www.omg.org/ > [7] http://xmi2code.sourceforge.net/ Nice collection of links. Will keep them for reference. ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) Research: http://metallo.scripps.edu/ Personal: http://www.castagnetto.org/ __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com

« previous php.pear.dev (#16822) next »