UML Flashcards
UML
Unified Modelling Language
- Standardized software design language
- Under the umbrella of Object Management Group (OMG)
- The “Swiss Army Knife” of notations
- The most used language for modelling software
advantages of UML
- It is not tied to any development process
- Waterfall, Scrum, Kanban, XP, etc.
- Can be used across the whole life cycle
- Promotes iterative refinement of models
- It is scalable
- You can zoom in with additional details when needed
- It has different representations
- Graphical
- Textual
- Machine-readable
- It is a general-purpose modelling language
- It can be used for modelling a mobile app, but also a satellite
- It is comprehensive
- Different parts of a system can be described with UML
- Supports both
- Descriptive models (originally intended usage by its creators)
- Prescriptive models (allows things like automatic model analysis and execution or code generation)
A UML model is represented graphically through
diagrams
Two types of UML diagrams
- structure
- behaviour
structure diagrams
- Emphasise the static description of the elements of the system being modelled
- Structural elements may have an associated behaviour, e.g., operations in a class diagram
behaviour diagrams
- Behaviour = the direct consequences of an action of at least one object
- Affects how the states of objects change over time
- Can be specified through the actions of a single object (e.g.,
state machine) or result from in
package diagrams
To describe the organisation of coarse-grained implementation units
activity diagrams
- To specify system behaviour via the control and data flow of
actions
→ Allows both structural and behavioural modelling to cover the overwhelming majority of any kind of system
Component diagram
For distributed systems with interprocess communication between components with clearly defined interfaces, e.g., service- or microservice based systems
state machine diagram
For systems with a decent number of clearly defined states, between which the system transitions, e.g., cyber-physical systems like smart homes or robots
sequence diagram
For systems with very complex, low-level method invocation flows that need to be modelled (activity diagrams are often easier to understand, but more suited to high-level flows)
object diagram
Situationally useful for reasoning about or debugging the creation of objects according to modelled constraints