11 December 2015

We can draw ascii diagrams or script UML diagrams in org-mode and org-mode will covert them into PNG pictures. "Scripting" diagrams is usually much more efficient than doing that in GUI applications. Also, we can easily modify these pictures since we have the "source code" of them.

What's Ditaa

Ditaa(home) is a jar which converts ascii arts into diagrams.

+--------+   +-------+    +-------+
|        | --+ ditaa +--> |       |
|  Text  |   +-------+    |diagram|
|Document|   |!magic!|    |       |
|     {d}|   |       |    |       |
|        |   |       |    |       |
|cBLU    |   |cBLK   |    |cGRE   |
+---+----+   +-------+    +-------+
    :                         ^
    |       Lots of work      |
    +-------------------------+

ditaa-example.png

What's PlantUML

PlantUML(User Guide) allows us to "script" UML diagram in Emacs.

hide footbox
title Sequence Diagram (Footer removed)

Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

plantuml-seq.png

title Hello World
scale 600 width
note "An Example of Class Diagram" as NOTE1

interface Interface {
    public void method1();
    public void method2();
}

class NullObject extends Interface
note bottom of NullObject: refer to design patter "null object"

abstract class BaseClass implements Interface {
    private int flag;
    protected void helper(){...}
}

class Concrete1 extends BaseClass
class Concrete2 extends BaseClass

plantuml-cls.png

git-gerrit-workflow.png



blog comments powered by Disqus