UML Modelling?

itsme213 itsme213 at hotmail.com
Thu Feb 14 14:08:20 UTC 2008


"Trygve Reenskaug" <trygver at ifi.uio.no> wrote

> IMO Smalltalk (like Java) lacks facilities for describing systems and
> particularly system behavior. UML 2.x has very powerful facilities for
> such modeling and could prove useful both for design and for 
> documentation.

Which parts in 2.x do you find best for this?

Have you considered whether Squeak method annotations might bridge some of 
the gap?

MyClass>>foo
  <annotation:#a with: #b>

> Any other use would be contrary to
> the spirit of Smalltalk.

Squeak class hierarchy to UML diagram is easy; attributes and associations 
are hard. To work typed UML <-> typeless Smalltalk code, you would need 
either additional type annotations (e.g. pragmas on read-accessors) or type 
inference (e.g. RoelTyper). Other UML diagrams might need additional 
annotations.

There is a Connectors-based package languishing somewhere that lets you draw 
some rudimentary UML in squeak itself. Dandelion, also languishing, does 
some Squeak code analysis and exports XMI
http://www.mars.dti.ne.jp/~umejava/smalltalk/stClasses/dandelion/index.html
http://www.mars.dti.ne.jp/~umejava/images/MagicDrawDandelion1.jpg

Dynamically figuring things out from the instance-level would be a different 
matter, specially if the tool was able to summarize certain information. 
There is a nice ClassDiagrammer available that reconstructs a class diagram 
from a set of instances, with a little work it could be very useful. A 
sequence diagram generated from actual trace of method sends could also be 
very useful. If you prefer to diagram first, then some of these diagrams 
could conceivably become inputs to tests.

My 2 c - Sophie






More information about the Squeak-dev mailing list