What was needed was a little dose of eye candy, something the reader could look at and immediately say "Aha! I know whats going on here!". It should also tie back directly to the class documents (which I render w/ a javadoc-ish tool), and support annotations.
After pondering my options, I grabbed my copy of UML Distilled and found what I needed: Sequence diagrams. Off to Google for a quick search for UML sequence diagram tools. There were a few of the Java variety, then what to my wondering eyes should appear but a CPAN link: [cpan://UML::Sequence] by [id://480254]. Straight away I pulled it down and gave it whirl. Pretty nifty. Not only could it reverse engineer Java and Perl code, but it had a handy little pseudocode language for rendering higher level, "extemporaneous" sequences.
Alas,
The result was just what I needed. I set about drafting all the pseudocode to describe all the complex interactions of all those perl objects...and ultimately reduced that dry pile of text to a nice package of HTML that fairly popped off the page and into the reader's cerebrum. To say the customer was impressed and pleased would be a gross understatement.
Here's a sample of some pseudocode input:
AtHome.Wash Car
/* the bucket is in the garage */
Garage.retrieve bucket
Kitchen.prepare bucket
Kitchen.pour soap in bucket
Kitchen.fill bucket
Garage.get sponge
Garage.checkDoor
-> clickDoorOpener
[ ifDoorClosed ] Garage.open door
* Driveway.apply soapy water
! Driveway.rinse
Driveway.empty bucket
Garage.close door
Garage.replace sponge
Garage.replace bucket
which produces this
(mouse around it a bit to see some of the effects).[id://480254] has graciously accepted my updates, and the result now resides in CPAN. So if you need a quick and easy modelling tool to explain those complex object collaborations, give [cpan://UML::Sequence] a try. Your design doc readers will thank you for it.
1. Based on the excellent wz_tooltip.js by Walter Zorn (careful, there be popups there!). Check out some of his other browser tools; he's got an impressive collection of Javascripts for sprucing up those mundane old web pages!
perlmonks.org content © perlmonks.org and renodino
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03