Uml Ascii Art Examples

These examples are here to illustrate how UML diagrams can be done in UmlAsciiArt, when Wiki pages need them. Before trying your own, check out the UmlAsciiArtTips.

Contributors: DavidPrice,


Composite design pattern structure (from DesignPatterns)

 +--------+  +-------------------+ *
 | Client |------>| Component         |<------------------------+
 +--------+       +-------------------+                         |
  | Operation()       |                         |
  | Add(Component)    |                         |
  | Remove(Component) |                         |
  | GetChild(int)     |                         |
  +--------+----------+                         |
                           .                                    |
                          /_\                                   |
                           |                                    |
                 +---------+------------+                       |
 |||
  +------+------++---------+---------+  children |
  | Leaf|| Composite         |<>---------+
  +-------------++-------------------+
  | Operation() || Operation()       |
  +-------------+| Add(Component)    |
| Remove(Component) |
| GetChild(int)     |
+-------------------+


Singleton design pattern structure (from DesignPatterns)

 +-----------------------+
 | Singleton |
 +-----------------------+
 | _Instance()_         |
 | SingletonOperation()  |
 | GetSingletonData() |
 +-----------------------+
 | _uniqueInstance_ |
 | singletonData |
 +-----------------------+

(This is boring, but is included to illustrate underlining for static items).


AbstractFactory design pattern structure (from DesignPatterns). This is really stretching the UmlAsciiArt idea to its limits...

+-------------------+  +--------+
| AbstractFactory() |<--------------------------------------------| Client |
+-------------------+  +----+---+
| CreateProductA()  |+------------------+       |
| CreateProductB()  || AbstractProductA |<---------+
+---------+---------++---------+--------+|
.  . |
/_\/_\|
|  | |
|+------+------+  |
+------------+------------+||  |
| |+-----+-----+ +-----+-----+|
| |:">| ProductA2 | | ProductA1 |<": |
| |:  +-----------+ +-----------+  : |
 +---------+--------++---------+--------+:: |
 | ConcreteFactory1 |"""  | ConcreteFactory2 |""""":+------------------+: |
 +------------------+  :  +------------------+:| AbstractProductB |<-------+
 | CreateProductA() |  :  | CreateProductA() |:+---------+--------+:
 | CreateProductB() |  :  | CreateProductB() |:.:
 +------------------+  :  +------------------+:/_\:
:
|:
:
+------+------+:
:
||:
: +-----+-----+ +-----+-----+ :
"">| ProductB2 | | ProductB1 |<":
+-----------+ +-----------+ :
:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""


Minimalist version (what are all the boxes buying you?):

Conversation
converse();
|
I
|
  +----------+---------+
  ||
Real_ConversationMock_Conversation
converse();  converse();
|
|
v
Socket


I think TabMunging busted some of these.


EditText of this page (last edited October 29, 2004) or FindPage with title or text search