Rules of UML

Rules of UML

UML has well-formed rules and regulations that should be followed, similar to other languages. It is not a good practice to draw these diagrams. Hence, rules must be followed. These rules describe the appearance of the model.

These rules are discussed below:

Name: Name of relationship, things, and diagrams.

Visibility: How these names will be seen and used by others.

Scope: Scope can be defined as an aspect that gives a definite meaning to a name.

Integrity: Integrity is used to measure how things are associated with each other.

Execution: It means to simulate the dynamic model.

Many stakeholders may be evolved in the development of the software, and it can also be viewed many times in different ways. Due to this, models should be designed in a proper manner. We should also develop the models that are inconsistent, incomplete, and omitted.

Common Mechanisms in UML

UML follows some broad mechanisms that should be applied throughout the language.

Those mechanisms are:

Specifications: UML languages are not only the graphical languages. At the back of every graphical notation, there is a specification available which provide a proper statement of the linguistics and syntax for the particular building block. We can use these graphical notations for visualizing a system. These specifications add a semantic base that accommodates every part of the system's model. Every element is related to each other in a well-formed manner.

Adornments: Many components are available inside the UML language that contain uncommon and some linear notation that gives a visual depiction of the essential aspects of various components. For example, classes are the most common element in the entire object-oriented systems. For this reason, the class's notations are designed to be easy to draw. Also, a class notation represents the primary forms of the class, such as an operation, attribute, and name. Every element in the UML notation begins with a prime symbol, to which a variety of embellishments can be combined.

Common Divisions: While designing object-oriented systems, often, the world gets distributed in so many ways.

  1. Classes and objects are isolated. Class is an abstraction, and an object is one full manifestation of that abstraction. As we have already discussed, classes and objects can be modeled efficiently in UML. UML determines an object with the use of the same symbol as the class name and then underlying the name of the object.
  2. There is a segregation of implementation and interface. An interface acknowledges a contract, and an implementation defines a particular recognition of that contract. It is responsible for carrying out the complete semantics of the interface. Interfaces and implementations can also be modeled in UML.
  3. Here is the separation of type and role. The type describes the entity’s class, such as an object, an attribute, or a parameter. A role declares the definition of an entity in its context, like a class, collaboration, or component.

Extensibility mechanisms: The UML is an open-ended language, making it possible for everyone to extend the language in a conducted way.

The extensibility mechanisms of UML include:

  • Stereotypes
  • Tagged values
  • Constraints

Every project comes with a 'UML extensibility' node. UML stereotypes and UML constraints are accumulated in this node. UML permits the addition of a pair of string (i.e., a value string and a tag string) on every model component. User-defined properties add the same features; however, the value can be of any kind (string, integer, boolean, and so on). Thus User-defined properties do the same as UML tagged values, but they do it better than other properties.