| 1 |
Gaphor |
|---|
| 2 |
~~~~~~ |
|---|
| 3 |
|
|---|
| 4 |
Gaphor is a UML CASE tool aiming for symplicity. It is written in Python and |
|---|
| 5 |
C. The goal is to write as much as possible in Python (easy scriptable for |
|---|
| 6 |
code generators) and only some elementary parts are written in C (this involves |
|---|
| 7 |
mainly the graphical items). |
|---|
| 8 |
|
|---|
| 9 |
So here's what has to be created: |
|---|
| 10 |
- A main window containing a tree-like representation of the classes |
|---|
| 11 |
- Windows which display the various diagrams |
|---|
| 12 |
- A model that contain all abstract data (generate from the UML metamodel |
|---|
| 13 |
definition) |
|---|
| 14 |
- Graphical items for classes, use cases, etc. (in C) |
|---|
| 15 |
- Keep the code modular and easy to extend in Python |
|---|
| 16 |
|
|---|
| 17 |
Main Window |
|---|
| 18 |
~~~~~~~~~~~ |
|---|
| 19 |
The main window can be created in Python. It can be created using Glade. |
|---|
| 20 |
We need a custom GtkTreeModel class that acts as a view over the UML model. |
|---|
| 21 |
The model is very extensive since it is generated from the UML Metamodel |
|---|
| 22 |
definition. |
|---|
| 23 |
|
|---|
| 24 |
Diagram Windows |
|---|
| 25 |
~~~~~~~~~~~~~~~ |
|---|
| 26 |
Diagrams have to be displayed in separate windows. Each window should carry |
|---|
| 27 |
a toolbox with diagram related objects. We do not restrict the use of elements |
|---|
| 28 |
from different diagram types in one diagram (like the Catalyst method). |
|---|
| 29 |
Actually we do restrict as little as possible, as long as it is permitted by |
|---|
| 30 |
the "MetaModel". |
|---|
| 31 |
|
|---|
| 32 |
Data Model |
|---|
| 33 |
~~~~~~~~~~ |
|---|
| 34 |
The data model itself is generated from the UML Metamodel. This has the |
|---|
| 35 |
advantage that we can do everything with it as long as the OMG's (Object |
|---|
| 36 |
Management Group <http://www.omg.org>, they develop UML now) rules are |
|---|
| 37 |
not violated. |
|---|
| 38 |
|
|---|
| 39 |
Graphical items |
|---|
| 40 |
~~~~~~~~~~~~~~~ |
|---|
| 41 |
Of course we need something to draw. The items that are to be placed on the |
|---|
| 42 |
diagrams need to be created. Since graphical stuff can take up a lot of time |
|---|
| 43 |
I think it is wise to create those things in C, instead of Python. |
|---|
| 44 |
We will however create hooks for the graphical items, so we can at least move |
|---|
| 45 |
them around and place them on a diagram from within Python. |
|---|
| 46 |
|
|---|
| 47 |
|
|---|