The development process in modern IT industry usually requires a big number of different means and tools. Before creating a working and valuable product the system has to be thoroughly designed. To facilitate the process of system design, the UML was invented.
So what is UML? UML abbreviation goes for Unified Modeling Language. UML is an artificial graphic language which is used, as you can guess from its name, for modeling computer applications with the help of diagrams. Diagrams are an apprehensible and visual way to construct and document artifacts of a software system. With UML IT specialists can read and distribute system structure and design plans like the builders have been doing for centuries with buildings blueprints
To avoid misunderstandings and ambiguities during development process UML has a set of 13 standard and unified diagrams. The most used of them are use case diagram, sequence diagram, class diagram, activity diagram and statechart diagram.
Use case diagram in UML
Use Case Diagrams describe the relationships and dependencies between use cases and personas involved in the process. They do not describe the internal structure of the system, but only illustrate a unit of functionality provided by the system.
To show a use case on a diagram, you draw an oval in the middle of the diagram and put the name of the use case in the center of the oval. To show a persona (a system user) on a use-case diagram, you draw a stick person and with simple lines denote relationships between actors and use cases.
Sequence diagrams show a detailed ordered flow of the objects interaction for a specific use case.
The main elements of the sequence diagram are:
- symbol of objects – boxes with the names of objects;
- vertical “lifelines”, reflecting a period of time;
- rectangles, reflecting the activities of the object or the execution of their specific features (rectangles on the dotted “lifeline”)
- arrows, showing the exchange of signals or messages between objects.
The class diagram is the main way to describe the structure of the system. It shows how the different entities (people, things, and data) relate to each other.
To show a class on the diagram you have to draw a rectangle with three horizontal sections: the upper section for the class’s name; the middle for the class’s attributes; the lower one for the class’s methods.
To show a big variety of relationship between classes the different types of lines are used.
An activity diagram shows a decomposition of some activity to its constituent parts. Often this kind of diagram is used to model high-level business processes.
Activity diagrams are composed of a limited number of shapes connected by arrows. Key figures are:
- Rounded rectangles – actions;
- Diamonds – solutions;
- Broadband – the beginning (bifurcation) and the end (toe) of branch operations;
- Black circle – the beginning of the process (the initial state);
- Black circle with a stroke – the end of the process (the final state);
- Arrows – go from the beginning to the end of the process and show the sequence of transitions.
The statechart diagram shows all possible states the class can be in and the transitions between these states. Statechart diagrams are often used to describe the behavior of particular objects, classes or even whole system.
The following symbols are used:
- Circle indicating the initial state;
- A circle with a small circle inside, indicating the final status (if any);
- Rounded rectangle indicates the state (after transition).
- The arrow indicates the transition. The name of the event (if any) that causes the transition is written next to the arrow.
- Thick horizontal line with a variety of incoming lines and one outgoing line or conversely. It represents the union and the branching respectively.