Below is a list and set of examples for each of the common UML components.Frames Classifiers Stereotypes Comments Dependencies Features/Properties
A frame encapsulates components and also provides context on the type of diagram being utilized. Frames have headings with a descriptive notation for the diagram type, the mapping for the diagram types is below:act = activity class = class cmp = component dep = deployment sd = interaction pkg = package stm = state machine uc = use case
Here is a sample frame for a use case diagram, note the uc heading at the top of the frame:
Components in the Classifier category are:Artifacts Components Classes Devices Interfaces
You will be using these elements for essentially every UML diagram. Their goal is to visually represent the domain.
Here is an example diagram with a class element:
Stereotypes allow you to extend metaclasses. Common use cases come into play when working with frameworks and Domain Specific Languages (DSLs). For example, below is a diagram that models the Model/View/Controller architecture.
Comments, also referred to as Notes allow you to add descriptive markup to UML elements. Returning to the class diagram we used earlier, the comments are located to the left of the class diagram and describe beahvior such as:Required data validations References to library dependencies Explananations for method goals
A dependency element denotes a situation where one element depends on another element. An example would be a music search engine that would depend on the Spotify API, as shown below:
A property represent the attributes/members of a UML element. Returning to our class diagram example once again, the Topic class has the following properties:Attribute: Title Attribute: Slug Attribute: Created At Attribute: Updated At Function: topTen()