[Uml-devel] Design Model derivation from existing Perl modules... (non-round-trip) [Beta Testers?]

Frotz frotz at acm.org
Sun Jun 18 16:35:50 UTC 2006


Hello,

I'm a recent Umbrello user.  I liked the tool well enough to push it hard  
into all of my work and personal development environments as the starting  
point.  Since I do a lot of Perl work, I wanted to have visibility into  
arbitrary Perl modules so that I can emulate (or better yet derive from)  
pre-existing Perl Module work.  I put together a regex-based scanner that  
seems to be close enough to support manual refactoring of code.

I'm interested in beta-testers and/or if the Umbrello project would like  
this as a contribution (I'm comfortable putting this under any OSI  
license).

My full /usr/lib/perl5 hierarchy generates a 3M XMI file.   
/usr/lib/perl5/site_perl/5.8.5/Net/ generates very clean graphs (including  
the derived class references).

SYNOPSIS:
[] Scan a directory tree for .pl and .pm and, using a regex-based state  
machine, build up the design model so that an XMI file can be emitted.

CAPABILITIES:
[] Starting from a directory or file list, scan each .pl / .pm file for  
package, class, method, parameter, attribute and generalization  
relationships.
[] Generate XMI (no Umbrello extensions).  Umbrello does a fine job  
completing the file.

ODDITIES:
[] I wanted Gang-of-Four and Fowler's Enterprise Architecture Design  
Patterns handy for my design work.  Therefore, I'm currently injecting  
this into the generated XMI output.  These are simply empty classes with  
very brief class level documentation and reasonable containment under  
"Patterns". (This should be conditionalized, but I'd like feedback.)
[] The script _always_ generates reversed.xmi.  I do this deliberate since  
you should NOT rely on this as a round-trip tool.  Its value is as a  
reversed view of the detected relationships for the scanned files.  If you  
want, rename the file to your be your project base.  (I'm flexible on this  
point, this is just my starting position.)

FAILURES:
[] Keeping the generated XML code XML-safe is a challenge.  I use a simple  
XML validator (e.g. MSIE) to provide feedback on where the generated XML  
is not XML-safe.  I don't feel right about repeatedly abusing web-based  
validators with 1.4+MB XML files on such trivial well-formedness failures.

BUGS:
[] There are probably more than a few still left here, but I think that it  
is stable enough for wider review.
[] The Design Patterns should be injected into an existing XMI file, but I  
cheaped-out and didn't do the work to get the xmi.ids integrated cleanly.   
If there is demand, this can be prioritized.
[] POD that is in a separate file and/or at the bottom of the file cannot  
be associated with the code block.

If you are interested, send me mail (frotz at acm.org)

If the project is interested, where do I find the steps to follow to get  
this contributed?

--
John "Frotz" Fa'atuai
frotz at acm.org
San Jose, CA






More information about the umbrello-devel mailing list