This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

This tutorial has been retrieved from Google and the Web Archive after the original site disappeared. The Web link to the Dia homepage has been updated.

A UML tutorial

I couldn't find a tutorial on the web on how to use UML in an actual design. So I will share with you my bad grammar along with my experience on my first UML design.

You can probably use a graphic tool to create UML designs. However I'd recommend a tool created with UML in mind. It will save you a lot of grief. I'm using a free-as-in-freedom tool named dia. I'm not using the latest version, but the 0.2 version seems to work ok, except for the EPS output which I don't particularly like.

The basics

A class diagram allows you to document how the class relates to other classes. The class diagram doesn't fix the actual implementation. The actual code might not be a direct translation of the diagram. However the functionality of the code will remain the same. In the following figure you can observe the following:

basic.gif

The above diagram shows the logical relationship between the components. It doesn't mean that a C++ class would be implemented using all the 5 classes represented here. Short cuts can be taken. However, the logical structure must remain the same. For example, you can move period outside of the General class and inside the Sub-Class. But the logic of the association remains the same.

The problem

I'm working on the Altima project and for it I want to create an isometric editor that can create worlds. It was decided that everything on the Altima world would be an entity. Using polymorphism, behavior can be added to the basic entity model. My problem is to define an entity that is usable by the server and the iso client.

The simplified requirements are:

The UML designs

To solve the above problem I started to design using UML. The first and second try introduce new UML particularities and the latest one tries to split and simplify the diagrams.

  1. Dia/UML Tutorial/Draft - The draft design: based on the C++ code that was there at the time.

  2. Dia/UML Tutorial/Second design - The second design: a design that addresses the shortcomings of the first draft.

  3. Dia/UML Tutorial/Third design - The third design: adds functionality and tries to simplify the entity diagram.

Lavoie Philippe

Created: Thu Jan 14 11:26:04 EST 1999 Last modified: Mon Jan 18 15:43:57 EST 1999


2024-10-23 10:58