UMLGraph/web/index.html

110 lines
4.0 KiB
HTML

<a href="https://github.com/dspinellis/UMLGraph"> <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png" alt="Fork me on GitHub" /></a>
<!-- Introduction {{{1 -->
<p>
UMLGraph allows the declarative specification and drawing of
UML class and sequence diagrams.
The current features
are part of an ongoing effort aiming to provide support for
all types UML diagrams.
An <em>IEEE Software</em> article titled
<a href="http://www.spinellis.gr/pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</a>
explains the rationale behind this approach.
The tehnology behind UMLGraph was used to draw many of the diagrams
appearing in the award-winning books
<a href="http://www.spinellis.gr/codequality">Code Quality: The Open Source Perspective</a> (Addison Wesley, 2006) and
<a href="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</a> (Addison Wesley, 2003).
In addition,
the <em>UMLGraphDoc</em> doclet included in this distribution automatically
adds UML diagrams to javadoc documentation.
</p>
<p>
Many programs build on UMLGraph; follow <a href="doc/deriv.html">this link</a>
for more details.
</p>
<div style="clear: both">
<p>
<a href="http://www.amazon.com/exec/obidos/ASIN/020165783X/dds-20" ><img src="umld.jpg" alt="UML Distilled" border='0' style="float:left; vertical-align: middle; margin-right: 2em; border-width: thin" /></a>
<a href="http://martinfowler.com">Martin Fowler</a>, the author of
<a href="http://www.amazon.com/exec/obidos/ASIN/020165783X/dds-20">UML Distilled</a>, writes:
</p>
<blockquote>
I thought I'd send you a note saying how much I enjoyed discovering UML Graph.
I've <a href="http://martinfowler.com/bliki/UmlSketchingTools.html">long fancied a text based way of describing UML diagrams</a>,
but never felt sufficiently time-rich to develop anything.
</blockquote>
</div>
<p style="clear: both">
<a href="http://www.amazon.com/dp/0596527934/?tag=dds-20" ><img src="jpt.jpg" alt="Java Power Tools" border='0' style="float:left; vertical-align: middle; margin-right: 2em; border-width: thin" /></a>
UMLGraph is also described in O'Reilly's <a href="http://www.amazon.com/dp/0596527934/?tag=dds-20">Java Power Tools</a> book.
</p>
<p style="clear: both"></p>
<h2>Class Diagrams</h2> <!-- {{{1 -->
One specifies a class diagram using the Java syntax complemented by
<a href="http://java.sun.com/j2se/javadoc/"><em>javadoc</em></a>
tags.
Running the UmlGraph doclet on the specification will generate
a
<a href="http://www.research.att.com/sw/tools/graphviz/">Graphviz</a>
diagram specification that can be automatically processed to
create Postscript, GIF, SVG, JPEG, fig, or Framemaker drawings.
<p />
The following is an example of a class diagram specification and the resulting UML
diagram:
<table>
<tr><td>
<pre>
class Person {
String Name;
}
class Employee extends Person {}
class Client extends Person {}
</pre>
</td><td>
<img src="doc/class-eg.gif" alt="Simple UML class diagram" />
</td></tr></table>
<h2>Sequence Diagrams</h2> <!-- {{{1 -->
One specifies a sequence diagram using <em>pic</em> macros to define
objects and method invocations.
The <a href="http://www.gnu.org/software/plotutils/plotutils.html">GNU plotutils</a>
<em>pic2plot</em> program can then process the sequence diagram to create a
PNG, PNM, (pseudo)GIF, SVG, AI, Postscript, CGM, FIG, PCL, HPGL, Regis, or TEK
drawing.
<p />
The following is an example of a sequence diagram specification and the
resulting UML diagram:
<table>
<tr><td>
<pre>
# Define the objects
object(O,"o:Toolkit");
placeholder_object(P);
step();
# Activation and messages
active(O);
message(O,O,"callbackLoop()");
create_message(O,P,"p:Peer");
message(O,P,"handleExpose()");
active(P);
return_message(P,O,"");
inactive(P);
destroy_message(O,P);
inactive(O);
# Complete the lifeline of O
step();
complete(O);
</pre>
</td><td>
<img src="doc/seq-eg.gif" alt="Simple UML sequence diagram" />
</td></tr></table>