Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TeeJay (2309)

TeeJay
  (email not shown publicly)
http://www.aarontrevena.co.uk/

Working in Truro
Graduate with BSc (Hons) in Computer Systems and Networks
pm : london.pm, bath.pm, devoncornwall.pm
lug : Devon & Cornwall LUG
CPAN : TEEJAY [cpan.org]
irc : TeeJay
skype : hashbangperl
livejournal : hashbangperl [livejournal.com]
flickr :hashbangperl [flickr.com]

Journal of TeeJay (2309)

Wednesday March 26, 2003
06:45 PM

autodia and argouml

[ #11257 ]
I have been looking at argouml so that I can make autodia work with it.

The pgml that argouml uses to represent UML like Class Diagrams is very unpleasent to work with - its a similar feeling to working with denormalised databases after a decent well designed one.

I was parsing Dia xml at the weekend and managed to succesfully parse it first into graphviz and then into Autodia's internal classes with relatively little effort. I suppose some familarity with Dia's XML schema helped but I hardly look at plain dia xml these days (I spend more time parsing source code and dealing with GraphViz and VCG because the XML TT2 template I use just works and hasn't been touched for over a year)

In comparison the XML that argouml is very nasty, firstly it is all spread accross several files, some of which can have different names, and it is all bundled in a bzip2 file - yucky!

The XMI file (Have I said how deeply unpleasent XMI is?) is hugely complex and unintelligble (XMI tends to be).

Then looking at the XML of one class diagram I prepared earlier, I notice that the whole structure is going to be a pig to extract anything from. For instance a class consists of

  • Description : org.argouml.uml.diagram.static_structure.ui.FigClass[82, 177, 117, 74] ( wha? wtf are coords doing in a description?) why doesn't it just say Class, within a UML Class Diagram Class surely only has one meaning ?!?
  • text : this is split into fig0.1 and fig0.2 one of which contains content and one doesn't. Inside fig0.1 I find the name of the class I created. Along with huge ammounts of graphic cruft that i don't need.
  • rectangle : more graphics stuff
  • group : aha! somewhere in here I will find the attributes of my class ! somewhere deep inside of 0.4 I find fig0.4.1 which contains along with a load of graphical information, 'newAttr : int' so that rather than storing the name and type of the attribute seperately they are munged together in the content part of a sub element of a sub element of a sub element of a sub element of the xml entity that has hidden some nuggets of useful information alongside huge ammounts of graphics-egg-sucking-for-grandmothers cruft.
  • A load of other stuff - I've lost interest now to be honest.

Who would have thought making open source diagram programs inter-operable would be so hard - they should all be holding pretty much the same kind of imformation about a uml diagram (classes, their attributed, methods, relationships, etc)

For all the apparent beauty of OO Java and XML it seems that the Gnome Dia XML is far better architecture, it manages to seperate presentation from application logic, making the information trivial to extract with lightweight tools like XML Simple. This being an application written with the apparently stonage C and GTK/Gnome libraries.

Every time I have to deal with Java I just end up looking for a perl or C alternative, mostly because my experience with Perl and C has been that stuff just worked.

As I said earlier today - I have been throwing Autodia at some of the VERY complex system we have at work (Multiple Oracle Schemas with hundreds of tables and even more functions and object, hundreds of cgi's and about a hundred or so modules (who says Perl doesn't scale, we even use objects and design patterns!)

The result was Autodia 1, HP Laserjet 2100 0, as everytime I tried to print a subsection of the system (between 50 and 250k postscript files) the printer sat and thought about it for 10 or 20 minutes before hanging and requiring a reset.

Eventually I managed to get a very very shrunken unreadable a4 page out. I so wish we had a nice A3 or A2 plotter for our Database Schemas and UML.

Anyway I found a few bugs in the autodia perl parser that I plan to work on tonight, and I should be able to release version 1.5 this weekend.

Don't expect interoperability with argouml anytime soon. This is probably the third or fourth time I have looked at XMI to provide interoperability between applications and it doesn't seem to actually offer anything I could use even if I was of a gnarly XSLT bent.

Gah! Tired and Fed up after doing a 8:45 til 7:30 day at the office (meaning a 12 hour day including the commute).

edited:

I just uploaded the second pre-release of version 1.5 in case you're interested - this includes new SQL, Dia and DBI handlers as well as misc fixes - it is however not tested very thoroughly.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.