Uml basics

If you want to do proper analysis you really need to be able to draw what you intend to build. Doing so will make you a better architect.

Even though I have learned uml at school, I did forgot most of it. I have however been able lately to spend more time on making proper analyses, and thus improving my own uml skills.

This is a quick wrap up of the most important relationships you can have in uml.

uml

Generalization
An object extends another object.

Implements
An object implements an interface.

Aggregation
Aggregation means that classes have their own life, but they can only belong to one parent. For example a department and a teacher.

Composition
A bit stronger than aggregation, is composition. If the parent object dies, children object dies to. Sometimes referred to as the death relation. Think of it as a house and rooms. When you delete the house, all rooms get deleted too.

Association
There is a relationship between both objects, but at the same time they also have their own life cycle.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.