uml is made similar by the presence of four common mechanisms that apply consistently throughout the...
TRANSCRIPT
Common mechanisms
Uml is made similar by the presence of four common
mechanisms that apply consistently throughout the
language. After constructing or developing the
architecture and different views of a software intensive
system, the developer should go for common
mechanisms. We have four types of common
mechanisms. They are…. Specifications
Adornments
Common divisions
Extensibility
Common mechanisms
Adornments Adornments are generally added to an element’s basic notation and are used to visualize details from the element’s specification .They are used to decorate a particular thing to specify some artifacts.
Adornments are classified into two types. They are…..
1. Textual adornments
2. Graphical or symbolic adornments.
Textual adornments
Most adornments are rendered by placing text near the
element. Textual adornments are the strings which delineate the
artifacts of a particular thing or relationship or a diagram. Some
of the common textual adornments are name, role names,
multiplicity, is aggregation or not.
Graphical adornments
Most adornments are rendered by adding a graphic
symbol to the basic elements. These are the adornments used to
specify the artifacts such as relationships, access specifiers etc.
some of the symbolic adornments are..
publicprivate
# protected
note
A note is a special kind of adornment, which is a
graphical symbol for rendering comments or constraints attached
to an element or collection of elements. These are used to specify
things like requirements, observations, reviews and explanations,
in addition to rendering constraints.
A note is rendered in uml using a rectangle with a dog-eared
corner. In uml a note can be rendered in three ways. They are…..
A note may contain some plain text
Put an url inside a note
Simple text
An embedded url
We may link to or embed another document
Extensibility mechanisms
Uml has the capability of extending its vocabulary,
properties, and semantics using one of the mechanisms known as
extensibility mechanisms. This mechanisms permit us to extend the
language in controlled ways.
these mechanisms include…
1. stereo types
2. tagged values
3. constraints
Link to document
constraints
Tagged values
Stereo types
Stereo types
A stereo type extends the vocabulary of the uml, allowing you
to create new kinds of building blocks that are derived from
existing ones but with its own properties, semantics and notation.
in simplest form a stereo type is rendered as a name enclosed by
guillements
define an icon for the stereotype and render that icon
to the right of the name
<<metaclass>>ModelElement
Named stereotype
<<exception>>underflow !
Named stereo type with icon
Render an icon as a basic symbol for the stereo typed item
Tagged values A tagged value extends the properties of a uml building block, allowing to create new information in that element’s specific function.
A tagged value is rendered as a string enclosed by brackets and placed below the name of another element. That string includes a name(tag), a separator(=) and a value( of the tag).
Stereotyped element as icon
Server{processors=3}
Constraints A constraint is a condition which is used to add or modify the existing rules or semantics for a well-formed model we need to have certain constraints established. A constraint is generally rendered as a simple statement or a mathematical equation in a pair of curly braces, and is placed by side of the thing to which it belongs. simple constraint
portfolio
Bank Account
corporation
Gender :{f,m}
person
{secure}
{or}
Constraint across multiple constraints
{self.wife.gender=female andSelf.husband.gender=male}
Formal constraint Using ocl
Comm
on
modeli
ng
techni
ques
based on the common mechanisms we can model the following
modeling comments modeling new building blocks modeling new properties modeling new semantics
Modeling comments
write the comment in the symbol provided and place the note by side of the element to which it refers.
the note can be elided or it can be made visible
if the note is lengthy, then write down the complete description in a document and place a link in the note referring the document
as the model evolves keep those comments that are significant , otherwise remove
Modeling new building blocks Make sure that the thing which we want to model doesn’t have
a graphical representation in uml
After conforming the above select any one of the eleven things
and stereotype it. Stereo typing can be done in two ways .
1. Selecting a stereo type which already exists.
2. Creating our own stereo type.
Specify new properties and semantics for the new thing.
If necessary place a icon for the above stereo type
Modeling new properties Make sure that there is no way to express a value using the
attributes of a class
In the above situation create a new tag and assign it a value
which we want to model <<subsystem>>FieldAccess
{version=2.5Status=checkdin}
<<subsystem>>Billing
{version=3.2Status=checkout
By=edg}
<<subsystem>>AccountsPayable{version=3.2.1
Status=checkedin}
<<subsystem>>WorldCurrency{version=7.5
Status=checedin}
----------------
--------
Modeling new semanticsMake sure there is no way to model the rules of constraints. Write down the constraints and new semantics for the element which we want to model and place adjacent to it If we want to express the constraints in a more precise way use ocl as apart of mentioning the constraints
member 1..* 1 manager
department
person
{subset} <---------
END.