Start Diagramming!

<- Previous

4. Meta-level

Before moving forward, an important concept to highlight is that of meta-levels.

Let's go back to our example of describing an "Order." When asked about what an order is, I probably wouldn't jump into describing the individual order I placed yesterday of a book on Amazon from the seller with 95% approval rating that will ship in 1 day for $9.99. Instead, I would talk about general concepts relating to ALL orders and what they all share in common.

While UML is certainly capable of modeling individual instances, with Class Diagrams (and generally when we do modeling) we don't model individual instances of things, we model categories of things generally. When modeling Class Diagrams, it's important to remember that we are modeling general concepts about ALL instances of that type of thing, not about individual instances themselves. In other words, we are modeling at a meta-level higher.

We sometimes use the word "Metadata" to mean "data about data." That concept is relevant here. Class Diagrams are really data or definitions of data.

"UML models do not contain objects, occurrences, or executions, because such individuals are part of the domain being modeled, not the content of the models themselves."

Metamodel

UML takes this concept one step further to give us a complete model of models. You may need to take a second to let that sink in. UML calls it the UML Metamodel. As the UML Metamodel is a model, it models itself. 🤯

"The fact that UML is defined using itself is no more surprising than the fact that many programming languages have compilers written in the language itself, or that recursive functions (such as the factorial function) can be defined using themselves."

Metaclasses

The classes in the UML Metamodel are called "Metaclasses." We haven't yet described what a class is, but it is relevant to highlight the fact that we are describing things at the "meta" level.

Next ->