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: UML::Sequence by philcrow. 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:
which produces this (mouse around it a bit to see some of the effects).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
philcrow 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 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!
|
|---|