Conceptual Model of The Unified Modeling Language
Conceptual Model of The Unified Modeling Language
Conceptual Model of The Unified Modeling Language
Structural Things
Structural things define the static part of the model. They represent
the physical and conceptual elements. Following are the brief
descriptions of the structural things.
Behavioral Things
Grouping Things
Annotational Things
Behavioral Diagrams
UML’s five behavioral diagrams are used to visualize, specify, construct, and
document the dynamic aspects of a system. It shows how the system behaves and
interacts with itself and other entities (users, other systems). They show how data
moves through the system, how objects communicate with each other, how the
passage of time affects the system, or what events cause the system to change
internal states. Since behavior diagrams illustrate the behavior of a system, they
are used extensively to describe the functionality of software systems. As an
example, the activity diagram describes the business and operational step-by-step
activities of the components in a system.
In other words, a behavioral diagram shows how the system works ‘in motion’,
that is how the system interacts with external entities and users, how it responds
to input or event and what constraints it operates under. There are seven
behavioral diagrams that you can model the dynamics of a system as listed in the
Table below:
Behavioral Diagram Brief Description
It is a graphical representations of workflows of stepwise
Activity Diagram
activities and actions with support for choice, iteration and
concurrency
It describes a system’s functional requirements in terms of
Use Case Diagram use cases that enable you to relate what you need from a
system to how the system delivers on those needs.
It shows the discrete behavior of a part of a designed
State Machine Diagram
system through finite state transitions.
It shows the sequence of messages exchanged between the
Sequence Diagram objects needed to carry out the functionality of the
scenario.
It shows interactions between objects and/or parts
Communication Diagram (represented as lifelines) using sequenced messages in a
free-form arrangement.
Interaction Overview It depicts a control flow with nodes that can
Diagram contain other interaction diagrams.
It shows interactions when the primary purpose of the
diagram is to reason about time by focusing on conditions
Timing Diagram
changing within and among lifelines along a linear time
axis.
In the six types of relationships, the code structure of the three types of
relationships such as composition , aggregation , and association is the same as
using attributes to store the references of another class. Therefore, they must be
distinguished by the relationship between the contents.
Inheritance
Realization / Implementation
Composition relationship
Composition: The relationship between the whole and the part, but the whole
and the part cannot be separated .
The combination relationship represents the relationship between the whole and
part of the class, and the overall and part have a consistent lifetime. Once the
overall object does not exist, some of the objects will not exist, and they will all die
in the same life.For example, a person is composed of a head and a body. The two
are inseparable and coexist.
Aggregation Relationship
Aggregation: The relationship between the whole and part, and the whole and
part can be separated.
Aggregate relations also represent the relationship between the whole and part of
the class, member objects are part of the overall object, but the member object can
exist independently from the overall object.
For example, bus drivers and work clothes and hats are part of the overall
relationship, but they can be separated. Work clothes and hats can be worn on
other drivers. Bus drivers can also wear other work clothes and hats.
Association Relationships
Dependencies
Dependence: Assume that a change in class A causes a change in class B, then say that class B
depends on class A.
In most cases, dependencies are reflected in methods of a class that use another class’s
object as a parameter .
A dependency relationship is a “use” relationship. A change in a particular thing may affect other
things that use it, and use a dependency when it is necessary to indicate that one thing uses
another.For example: The car relies on gasoline. If there is no gasoline, the car will not be able to
drive
Constraints
tagged values
Stereotypes
A stereotype extends the vocabulary of the UML, allowing you to create new
kinds of building
blocks that are derived from existing ones but that are specific to your problem.
They are used for classifying or marking the UML building blocks in order to
introduce new building blocks that speak the language of your domain and that
look like primitive, or basic, model elements.
For example, if you are working in a programming language, such as Java or C++,
you will often want to model exceptions. In these languages, exceptions are just
classes, although they are treated in very special ways. Typically, you only want
to allow them to be thrown and caught, nothing else. You can make exceptions
first-class citizens in your models, meaning that they are treated like basic
building blocks, by marking them with an appropriate stereotype, as for the class
Overflow as shown in the Figure below:
Tagged Values
A tagged value extends the properties of a UML building block, allowing you to
create new information in that element’s specification. They are properties for
specifying keyword-value pairs of model elements, where the keywords are
attributes. They allow you to extend the properties of a UML building block so
that you create new information in the specification of that element. Tagged
Values can be defined for existing model elements, or for individual stereotypes
so that everything with that stereotype has that tagged value. It is important to
mention that a tagged value is not equal to a class attribute. Instead, you can
regard a tagged value as being metadata, since its value applies to the element
itself and not to its instances.
Graphically, a tagged value is rendered as a string enclosed by brackets, which is
placed below the name of another model element. The string consists of a name
(the tag), a separator (the symbol =), and a value (of the tag) as shown in the
Figure below:
You can specify just the value if its meaning is unambiguous, such as when the
value is the name of the enumeration.
Usage of Tagged Values
One of the most common uses of a tagged value is to specify properties that are
relevant to code generation or configuration management. So, for example, you
can make use of a tagged value in order to specify the programming language to
which you map a particular class, or you can use it to denote the author and the
version of a component.
Tagged Value Example – Configuration Management System
Suppose you want to tie the models you create to your project’s configuration
management system. Among other things, this means keeping track of the version
number, current check-in/check out status, and perhaps even the creation and
modification dates of each subsystem. Because this is process-specific
information, it is not a basic part of the UML, although you can add this
information as tagged values. Furthermore, this information is not just a class
attribute either. A subsystem’s version number is part of its metadata, not part of
the model.
The Figure below shows four subsystems, each of which has been extended to
include its version number and status. In the case of the Billing subsystem, one
other tagged value is shown – the person who has currently checked out the
subsystem.
Constraints
A constraint is an extension of the semantics of a UML element, allowing you to
add new rules or to modify existing ones. They allow you to extend the semantics
of a UML building block by adding new rules or modifying existing ones. A
constraint specifies conditions that must be held true for the model to be well-
formed. This notation can also be used to adorn a model element’s basic notation,
in order to visualize parts of an element’s specification that have no graphical cue.
For example, you can use constraint notation to provide some properties of
associations, such as order and changeability
Graphically, a constraint is rendered as a string enclosed by brackets and placed
near the associated element or connected to that element or elements by
dependency relationships. The example below shows, you might want to specify
that, across a given association, communication is encrypted. Similarly, you
might want to specify that among a set of associations, only one is manifest at a
time.
Architecture of UML
A model is a way to represent a system. To envision a system, we will build
several models. Architecture is the collection of several views. The stakeholders
(end-users, analysts, developers, system integrators, testers, technical
writers, and project managers) of a project will be involved in different views.
Architecture is all about how a system is built at its highest level. It is necessary to
think large from multiple angles with high quality, productivity, and design in
mind. The software team is engaged in many practical matters, such as:
Software architecture describes the parts included in the system, each function has
parts, and the relationship between these parts.
It is important to have well-formed software architecture, mainly for an extensive
software system. The software architect will consider a lot of factors to design the
architecture: