Com 213 Unified Modelling Launguage Programming Theory
Com 213 Unified Modelling Launguage Programming Theory
VOCATIONAL EDUCATION
REVITALISATION PROJECT-PHASE II
NATIONAL DIPLOMA IN
COMPUTER TECHNOLOGY
Pg 1
(COM213)
THEORY
Version 1: December 2008
TABLE OF CONTENTS
Table of Contents
WEEK 1 OJECT ORIENTED TECHNIQUE ....................................................................... 3
Overview ............................................................................................................ 3
History ................................................................................................................ 7
WEEK 2 UNIFIED MODELLING LANGUAGE (UML) – The General Overview ............... 12
History .............................................................................................................. 12
Methods ........................................................................................................ 14
Modelling ...................................................................................................... 15
Pg 1
WEEK 7 OBJECT AND PACKAGE DIAGRAM .................................................................. 56
WEEK 8 DEPLOYMENT ...................................................................................................... 60
WEEK One
Introduction
Overview
Pg 1
subclasses, virtual methods, coroutines, garbage collection, and
discrete event simulation) as a superset of Algol. Simula was used
for physical modeling, such as models to study and improve the
movement of ships and their content through cargo ports. Smalltalk
was the first programming language to be called "object-oriented".
Fundamental concepts
Pg 1
A pattern (exemplar) of a class. The class of Dog defines all
possible dogs by listing the characteristics and behaviors
they can have; the object Lassie is one particular dog, with
particular versions of the characteristics. A Dog has fur; Lassie
has brown-and-white fur.
Instance
One can have an instance of a class or a particular object.
The instance is the actual object created at runtime. In
programmer jargon, the Lassie object is an instance of the
Dog class. The set of values of the attributes of a particular
object is called its state. The object consists of state and the
behaviour that's defined in the object's class.
Method
An object's abilities. In language, methods are verbs. Lassie,
being a Dog, has the ability to bark. So bark() is one of Lassie's
methods. She may have other methods as well, for example
sit() or eat() or walk() or save_timmy(). Within the program,
using a method usually affects only one particular object; all
Dogs can bark, but you need only one particular dog to do the
barking.
Message passing
Pg 1
“The process by which an object sends data to another
object or asks the other object to invoke a method.” [1] Also
known to some programming languages as interfacing. E.g.
the object called Breeder may tell the Lassie object to sit by
passing a 'sit' message which invokes Lassie's 'sit' method.
The syntax varies between languages, for example: [Lassie
sit] in Objective-C. In Java code-level message passing
corresponds to "method calling". Some dynamic languages
use doubledispatch or multi-dispatch to find and pass
messages.
Inheritance
‘Subclasses’ are more specialized versions of a class, which
inherit attributes and behaviors from their parent classes,
and can introduce their own.
For example, the class Dog might have sub-classes called
Collie, Chihuahua, and GoldenRetriever. In this case, Lassie would
be an instance of the Collie subclass. Suppose the Dog class
defines a method called bark() and a property called furColor.
Each of its sub-classes (Collie, Chihuahua, and GoldenRetriever)
will inherit these members, meaning that the programmer
only needs to write the code for them once.
Each subclass can alter its inherited traits. For example, the
Collie class might specify that the default furColor for a collie is
brown-and-white. The Chihuahua subclass might specify that
the bark() method produces a high pitch by default.
Subclasses can also add new members. The Chihuahua
subclass could add a method called tremble(). So an individual
chihuahua instance would use a high-pitched bark() from the
Chihuahua subclass, which in turn inherited the usual bark()
from Dog. The chihuahua object would also have the tremble()
method, but Lassie would not, because she is a Collie, not a
Chihuahua. In fact, inheritance is an ‘is-a’ relationship: Lassie is
a Collie. A Collie is a Dog. Thus, Lassie inherits the methods of
both Collies and Dogs.
Multiple inheritance is inheritance from more than one
ancestor class, neither of these ancestors being an ancestor
of the other. For example, independent classes could define
Dogs and Cats, and a Chimera object could be created from
these two which inherits all the (multiple) behavior of cats
and dogs. This is not always supported, as it can be hard
both to implement and to use well.
Abstraction
Abstraction is simplifying complex reality by modelling
classes appropriate to the problem, and working at the most
Pg 1
appropriate level of inheritance for a given aspect of the
problem.
For example, Lassie the Dog may be treated as a Dog much of
the time, a Collie when necessary to access Collie-specific
attributes or behaviors, and as an Animal (perhaps the parent
class of Dog) when counting Timmy's pets. Abstraction is also
achieved through Composition. For example, a class Car
would be made up of an Engine, Gearbox, Steering objects,
and many more components. To build the Car class, one does
not need to know how the different components work
internally, but only how to interface with them, i.e., send
messages to them, receive messages from them, and
perhaps make the different objects composing the class
interact with each other.
Encapsulation
Encapsulation conceals the functional details of a class from
objects that send messages to it.
For example, the Dog class has a bark() method. The code for
the bark() method defines exactly how a bark happens (e.g.,
by inhale() and then exhale(), at a particular pitch and
volume). Timmy, Lassie's friend, however, does not need to
know exactly how she barks. Encapsulation is achieved by
specifying which classes may use the members of an object.
The result is that each object exposes to any class a certain
interface — those members accessible to that class. The
reason for encapsulation is to prevent clients of an interface
from depending on those parts of the implementation that
are likely to change in future, thereby allowing those
changes to be made more easily, that is, without changes to
clients. For example, an interface can ensure that puppies
can only be added to an object of the class Dog by code in
that class. Members are often specified as public, protected
or private, determining whether they are available to all
classes, sub-classes or only the defining class. Some
languages go further: Java uses the default access modifier
to restrict access also to classes in the same package, C#
and VB.NET reserve some members to classes in the same
assembly using keywords internal (C#) or Friend (VB.NET),
and Eiffel and C++ allow one to specify which classes may
access any member.
Polymorphism
Polymorphism allows the programmer to treat derived class
members just like their parent class' members. More
precisely, Polymorphism in object-oriented programming is
Pg 1
the ability of objects belonging to different data types to
respond to method calls of methods of the same name, each
one according to an appropriate type-specific behavior. One
method, or an operator such as +, -, or *, can be abstractly
applied in many different situations. If a Dog is commanded
to speak(), this may elicit a bark(). However, if a Pig is
commanded to speak(), this may elicit an oink(). They both
inherit speak() from Animal, but their derived class methods
override the methods of the parent class; this is Overriding
Polymorphism. Overloading Polymorphism is the use of one
method signature, or one operator such as ‘+’, to perform
several different functions depending on the implementation.
The ‘+’ operator, for example, may be used to perform
integer addition, float addition, list concatenation, or string
concatenation. Any two subclasses of Number, such as Integer
and Double, are expected to add together properly in an OOP
language. The language must therefore overload the
addition operator, ‘+’, to work this way. This helps improve
code readability. How this is implemented varies from
language to language, but most OOP languages support at
least some level of overloading polymorphism. Many OOP
languages also support Parametric Polymorphism, where
code is written without mention of any specific type and thus
can be used transparently with any number of new types.
Pointers are an example of a simple polymorphic routine that
can be used
with many different types of objects.[2]
Decoupling
Decoupling allows for the separation of object interactions
from classes and inheritance into distinct layers of
abstraction. A common use of decoupling is to
polymorphically decouple the encapsulation, which is the
practice of using reusable code to prevent discrete code
modules from interacting with each other.
Pg 1
History
Pg 1
combinatorial explosion of how the different attributes from
different ships could affect one another. The idea occurred to
group the different types of ships into different classes of objects,
each class of objects being responsible for defining its own data
and behavior.)[citation needed] Such an approach was a simple
extrapolation of concepts earlier used in analog programming. On
analog computers, mapping from real-world phenomena/objects to
analog phenomena/objects (and conversely), was (and is) called
'simulation'. Simula not only introduced the notion of classes, but
also of instances of classes, which is probably the first explicit use
of those notions. The ideas of Simula 67 influenced many later
languages, especially Smalltalk and derivatives of Lisp and Pascal.
At ETH Zürich, Niklaus Wirth and his colleagues had also been
investigating such topics as data abstraction and modular
programming. Modula-2 included both, and their succeeding
design,
Pg 1
Oberon, included a distinctive approach to object orientation,
classes, and such. The approach is unlike Smalltalk, and very
unlike C++.
In the past decade Java has emerged in wide use partially because
of its similarity to C and to C++, but perhaps more importantly
because of its implementation using a virtual machine that is
intended to run code unchanged on many different platforms. This
last feature has made it very attractive to larger development
shops with heterogeneous environments. Microsoft's .NET initiative
has a similar objective and includes/supports several new
languages, or variants of older ones with the important caveat that
it is, of course, restricted to the Microsoft platform.
Importance of OOP
Definition: Object-oriented programming is a productivity tool.
Each of these features is a step on the road to reliable and
productive programming. By using pre-built libraries of code, you
can save time and still have the flexibility of altering the way that
they work to suit your own needs. With OOP there are lots of extra
features that encourage putting thought into structuring programs
so that they are more maintainable. By gathering code into
CLASSES, large programs are divided into small manageable
sections, in the same way that you divide small programs into
functions. This is very important, because the difficulty of
understanding pieces of code increases exponentially.
WEEK Two
Introduction
UML combines the best practice from data modelling concepts such
as entity relationship diagrams, business modelling (work flow),
object modelling and component modelling. It can be used with all
processes, throughout the software development life cycle, and
across different implementation technologies.
Standardization
UML is officially defined by the Object Management Group (OMG)
as the UML metamodel, a Meta-Object Facility metamodel (MOF).
Like other MOF-based specifications, UML has allowed software
developers to concentrate more on design and architecture. UML
models may be automatically transformed to other representations
(e.g. Java) by means of QVT-like transformation languages,
supported by the OMG.
History
History of Object Oriented methods and notation.
Before UML 1.x
After Rational Software Corporation hired James Rumbaugh from
General Electric in 1994, the company became the source for the
two most popular object-oriented modeling approaches of the day:
Rumbaugh's OMT, which was better for object-oriented analysis
(OOA), and Grady Booch's Booch method, which was better for
object-oriented design (OOD). Together Rumbaugh and Booch
attempted to reconcile their two approaches and started work on a
Unified Method.
They were soon assisted in their efforts by Ivar Jacobson, the
creator of the object-oriented software engineering (OOSE)
method. Jacobson joined Rational in 1995, after his company,
Pg 1
Objectory, was acquired by Rational. The three methodologists
were collectively referred to as the Three Amigos, since they were
well known to argue frequently with each other regarding
methodological preferences.
UML 1.x
As a modeling notation, the influence of the OMT notation
dominates (e. g., using rectangles for classes and objects).
Though the Booch "cloud" notation was dropped, the Booch
capability to specify lower-level design detail was embraced. The
use case notation from Objectory and the component notation
from Booch were integrated with the rest of the notation, but the
semantic integration was relatively weak in UML 1.1, and was not
really fixed until the UML 2.0 major revision.
Concepts from many other OO methods were also loosely
integrated with UML with the intent that UML would support all OO
methods. For example CRC Cards (circa 1989 from Kent Beck and
Ward Cunningham), and OORam were retained. Many others
contributed too with their approaches flavoring the many models
of the day including: Tony Wasserman and Peter Pircher with the
"ObjectOriented Structured Design (OOSD)" notation (not a
method), Ray Buhr's "Systems Design with Ada", Archie Bowen's
use case and timing analysis, Paul Ward's data analysis and David
Harel's "Statecharts", as the group tried to ensure broad coverage
in the real-time systems domain. As a result, UML is useful in a
variety of engineering problems, from single process, single user
Pg 1
applications to concurrent, distributed systems, making UML rich
but large.
The Unified Modeling Language is an international standard:
Methods
UML is not a method by itself; however, it was designed to be
compatible with the leading object-oriented software development
methods of its time (for example OMT, Booch method, Objectory).
Since UML has evolved, some of these methods have been recast
to take advantage of the new notations (for example OMT), and
new methods have been created based on UML. The best known is
IBM Rational Unified Process (RUP). There are many other UML-
based methods like Abstraction Method, Dynamic Systems
Development Method, and others, designed to provide more
specific solutions, or achieve different objectives.
Modelling
It is very important to distinguish between the UML model and the
set of diagrams of a system. A diagram is a partial graphical
representation of a system's model. The model also contains a
"semantic backplane" — documentation such as written use cases
that drive the model elements and diagrams.
UML diagrams represent three different views of a system model:
Pg 1
• Functional requirements view: Emphasizes the functional
requirements of the system from the user's point of view.
And includes use case diagrams.
• Static structural view: Emphasizes the static structure of the
system using objects, attributes, operations and
relationships. And includes class diagrams and composite
structure diagrams.
• Dynamic behavior view: Emphasizes the dynamic behavior of
the system by showing collaborations among objects and
changes to the internal states of objects. And includes
sequence diagrams, activity diagrams and state machine
diagrams.
UML models can be exchanged among UML tools by using the XMI
interchange format.
Diagrams overview
UML 2.0 has 13 types of diagrams divided into three categories:
Six diagram types represent structure application structure, three
represent general types of behavior, and four represent different
aspects of interactions. These diagrams can be categorized
hierarchically as shown in the following Class diagram:
Pg 1
UML does not restrict UML element types to a certain diagram
type. In general, every UML element may appear on almost all
types of diagrams. This flexibility has been partially restricted in
UML 2.0. In keeping with the tradition of engineering drawings, a
comment or note explaining usage, constraint, or intent is always
allowed in a UML diagram.
Structure diagrams
Structure diagrams emphasize what things must be in the system
being modeled:
• Class diagram: describes the structure of a system by
showing the system's classes, their attributes, and the
relationships among the classes.
• Component diagram: depicts how a software system is split
up into components and shows the dependencies among
these components.
• Composite structure diagram: describes the internal
structure of a class and the collaborations that this structure
makes possible.
• Deployment diagram serves to model the hardware used in
system implementations, the components deployed on the
hardware, and the associations among those components.
• Object diagram: shows a complete or partial view of the
structure of a modeled system at a specific time.
• Package diagram: depicts how a system is split up into
logical groupings by showing the dependencies among these
groupings.
Composite
Class diagram Component structure diagrams Deployment
diagram
diagram
Object
diagram Package
diagram
Behavior diagrams
Behavior diagrams emphasize what must happen in the system
being modeled:
• Activity diagram: represents the business and operational
step-by-step workflows of components in a system. An
activity diagram shows the overall flow of control.
• State diagram: standardized notation to describe many
systems, from computer programs to business processes. Pg 1
• Use case diagram: shows the functionality provided by a
system in terms of actors, their goals represented as use
cases, and any dependencies among those use cases.
Interaction diagrams
Interaction diagrams, a subset of behavior diagrams, emphasize
the flow of control and data among the things in the system being
modelled:
• Communication diagram shows the interactions between
objects or parts in terms of sequenced messages. They
represent a combination of information taken from Class,
Sequence, and Use Case Diagrams describing both the static
structure and dynamic behavior of a system.
• Interaction overview diagram: a type of activity diagram in
which the nodes represent interaction diagrams.
• Sequence diagram: shows how objects communicate with
each other in terms of a sequence of messages. Also
indicates the lifespans of objects relative to those messages.
• Timing diagrams: are a specific type of interaction diagram,
where the focus is on timing constraints.
Communication
diagram Interaction overview Sequence
diagram diagram
Pg 1
and if they remember anything at all from their geometry, it is
good old Pythagoras.
We can say that not only in mathematics but in all other fields
progress is made by having a common notation that can be used
to express concepts, and how diagrams begin to take on precision
and meaning once we attach semantics to the pictures. The most
useful of these notations are understood the world over.
An electrical circuit
Introduction
The structure diagrams show the static structure of the system
being modelled; focusing on the elements of a system, irrespective
of time. Static structure is conveyed by showing the types and
their instances in the system. Besides showing system types and
their instances, structure diagrams also show at least some of the
relationships among and between these elements and potentially
even show their internal structure.
Structure diagrams are useful throughout the software lifecycle for
a variety of team members. In general, these diagrams allow for
design validation and design communication between individuals
and teams. For example, business analysts can use class or object
diagrams to model a business's current assets and resources, such
as account ledgers, products, or geographic hierarchy. Architects
can use the component and deployment diagrams to test/verify
that their design is sound. Developers can use class diagrams to
design and document the system's coded (or soon-to-be-coded)
classes.
Pg 1
The class diagram
The Class diagram describes the structure of a system by showing
the system's classes, their attributes, and the relationships among
the classes.
• a class
• an interface
• a data type
• a component.
Class name
The UML representation of a class is a rectangle containing three
compartments stacked vertically, as shown in Figure 3.1. The top
compartment shows the class's name. The middle compartment
lists the class's attributes. The bottom compartment lists the
class's operations. When drawing a class element on a class Pg 1
diagram, you must use the top compartment, and the bottom two
compartments are optional. (The bottom two would be
unnecessary on a diagram depicting a higher level of detail in
which the purpose is to show only the relationship between the
classifiers.) Figure 3.1 shows an airline flight modelled as a UML
class. As we can see, the name is Flight, and in the middle
compartment we see that the Flight class has three attributes:
flightNumber, departureTime, and flightDuration. In the bottom
compartment we see that the Flight class has two operations:
delayFlight and getArrivalTime.
flightNumber : Integer
Table 3.1: The Flight class's attribute names with their associated types
Attribute Name Attribute Type
flightNumber Integer
departureTime Date
flightDuration Minutes
Pg 1
In business class diagrams, the attribute types usually correspond
to units that make sense to the likely readers of the diagram (i.e.,
minutes, dollars, etc.). However, a class diagram that will be used
to generate code needs classes whose attribute types are limited
to the types provided by the programming language, or types
included in the model that will also be implemented in the system.
Sometimes it is useful to show on a class diagram that a particular
attribute has a default value. (For example, in a banking account
application a new bank account would start off with a zero
balance.) The UML specification allows for the identification of
default values in the attribute list section by using the following
notation:
For example:
balance : Dollars = 0
Figure 3.2: A Bank Account class diagram showing the balance attribute's value
defaulted to zero dollars.
Pg 1
displayed in a list format, with each operation on its own line.
Operations are documented using the following notation:
Figure 3.3 shows that the delayFlight operation has one input
parameter -- numberOfMinutes -- of the type Minutes. However,
the delayFlight operation does not have a return value. When an
operation has parameters, they are put inside the operation's
parentheses; each parameter uses the format "parameter name :
parameter type".
Figure 3.3: The Flight class operations parameters include the optional "in"
marking.
Inheritance
A very important concept in object-oriented design, inheritance,
refers to the ability of one class (child class) to inherit the identical
functionality of another class (super class), and then add new
functionality of its own. (In a very non-technical sense, imagine
that I inherited my mother's general musical abilities, but in my
family I'm the only one who plays electric guitar.) To model
inheritance on a class diagram, a solid line is drawn from the child
class (the class inheriting the behavior) with a closed, unfilled
arrowhead (or triangle) pointing to the super class. Consider types
of bank accounts: Figure 3.4 shows how both CheckingAccount
and SavingsAccount classes inherit from the BankAccount class.
Associations
When you model a system, certain objects will be related to each
other, and these relationships themselves need to be modelled for
clarity. There are five types of associations. -- bi-directional,
unidirectional associations, Association class, Aggregation, and
Reflexive associations --
Pg 1
Figure 3.6: An example of a bi-directional association between a Flight class and
a Plane class
Uni-directional association
In a uni-directional association, two classes are related, but only
one class knows that the relationship exists. Figure 3.7 shows an
example of an overdrawn accounts report with a uni-directional
association.
Association class
In modeling an association, there are times when you need to
include another class because it includes valuable information
about the relationship. For this you would use an association class
that you tie to the primary association. An association class is
represented like a normal class. The difference is that the
association line between the primary classes intersects a dotted
line connected to the association class. Figure 3.8 shows an
association class for our airline industry example.
Pg 1
Figure 3.8: Adding the association class MileageCredit
Aggregation
Aggregation is a special type of association used to model a "whole
to its parts" relationship. In basic aggregation relationships, the
lifecycle of a part class is independent from the whole class's
lifecycle.
For example, we can think of Car as a whole entity and Car Wheel
as part of the overall Car. The wheel can be created weeks ahead
of time, and it can sit in a warehouse before being placed on a car
during assembly. In this example, the Wheel class's instance
clearly lives independently of the Car class's instance. However,
there are times when the part class's lifecycle is not independent
from that of the whole class -- this is called composition
aggregation. Consider, for example, the relationship of a company
to its departments. Both Company and Departments are modelled
as classes, and a department cannot exist before a company
exists. Here the Department class's instance is dependent upon
the existence of the Company class's instance.
Let's explore basic aggregation and composition aggregation
further.
Basic aggregation
An association with an aggregation relationship indicates that one
class is a part of another class. In an aggregation relationship, the
child class instance can outlive its parent class. To represent an
aggregation relationship, you draw a solid line from the parent
class to the part class, and draw an unfilled diamond shape on the
parent class's association end. Figure 3.9 shows an example of an
aggregation relationship between a Car and a Wheel. Pg 1
Figure 3.9: Example of an aggregation association
Composition aggregation
The composition aggregation relationship is just another form of
the aggregation relationship, but the child class's instance lifecycle
is dependent on the parent class's instance lifecycle. In Figure
3.10, which shows a composition relationship between a Company
class and a Department class, notice that the composition
relationship is drawn like the aggregation relationship, but this
time the diamond shape is filled.
Reflexive associations
We have now discussed all the association types. As you may have
noticed, all our examples have shown a relationship between two
different classes. However, a class can also be associated with
itself, using a reflexive association. This may not make sense at
first, but remember that classes are abstractions. Figure 3.11
shows how an Employee class could be related to itself through the
manager/manages role. When a class is associated to itself, this
does not mean that a class's instance is related to itself, but that
an instance of the class is related to another instance of the class.
Pg 1
Figure 3.11: Example of a reflexive association relationship
Pg 1
WEEK Four
Packages
Inevitably, if you are modelling a large system or a large area of a
business, there will be many different classifiers in your model.
Managing all the classes can be a daunting task; therefore, UML
provides an organizing element called a package. Packages enable
modellers to organize the model's classifiers into namespaces,
which is sort of like folders in a filing system. Dividing a system
into multiple packages makes the system easier to understand,
especially if each package represents a specific part of the system.
There are two ways of drawing packages on diagrams. There is no
rule for determining which notation to use, except to use your
personal judgement regarding which is easiest to read for the class
diagram you are drawing. Both ways begin with a large rectangle
with a smaller rectangle (tab) above its upper left corner, as seen
in Figure 3.13. But the modeller must decide how the package's
membership is to be shown, as follows:
Pg 1
Figure 3.12: An example package element that shows its members inside the
package's rectangle boundaries
Pg 1
Figure 3.13: An example package element showing its membership via
connected lines
Interfaces
Earlier in this article, it is suggested that you think of classifiers
simply as classes. In fact, a classifier is a more general concept,
which includes data types and interfaces.
So why do I mention data types and interfaces here? There are
times when you might want to model these classifier types on a
structure diagram, and it is important to use the proper notation in
doing so, or at least be aware of these classifier types. Drawing
these classifiers incorrectly will likely confuse readers of your
structure diagram, and the ensuing system will probably not meet
requirements.
Pg 1
A class and an interface differ: A class can have an actual instance
of its type, whereas an interface must have at least one class to
implement it. In UML 2, an interface is considered to be a
specialization of a class modelling element. Therefore, an interface
is drawn just like a class, but the top compartment of the
rectangle also has the text "«interface»", as shown in Figure 3.14
Visibility
In object-oriented design, there is a notation of visibility for
attributes and operations. UML identifies four types of visibility:
public, protected, private, and package.
Pg 1
The UML specification does not require attributes and operations
visibility to be displayed on the class diagram, but it does require
that it be defined for each attribute or operation. To display
visibility on the class diagram, you place the visibility mark in front
of the attribute's or operation's name. Though UML specifies four
visibility types, an actual programming language may add
additional visibilities, or it may not support the UML-defined
visibilities. Table 3.4 displays the different marks for the UML-
supported visibility types.
Now, let's look at a class that shows the visibility types indicated
for its attributes and operations. In Figure 3.15, all the attributes
and operations are public, with the exception of the updateBalance
operation. The updateBalance operation is protected.
Figure 3.15: A BankAccount class that shows the visibility of its attributes and
operations
Pg 1
Instances
When modelling a system's structure it is sometimes useful to
show example instances of the classes. To model this, UML 2
provides the instance specification element, which shows
interesting information using example (or real) instances in the
system.
The notation of an instance is the same as a class, but instead of
the top compartment merely having the class's name, the name is
an underlined concatenation of:
For example:
Donald : Person
Figure 3.16: An example instance of a Plane class (only the interesting attribute
values are shown)
Figure 3.17 has two instances of the Flight class because the class
diagram indicated that the relationship between the Plane class
and the Flight class is zero-to-many. Therefore, our example
shows the two Flight instances that the NX0337 Plane instance is
related to.
Roles
Modelling the instances of classes is sometimes more detailed than
one might wish. Sometimes, you may simply want to model a
class's relationship at a more generic level. In such cases, you
should use the role notation. The role notation is very similar to
the instances notation. To model a class's role, you draw a box
and place the class's role name and class name inside as with the
instances notation, but in this case you do not underline the
words. Figure 3.18 shows an example of the roles played by the
Employee class described by the diagram at Figure 3.11. In Figure
3.18, we can tell, even though the Employee class is related to
itself, that the relationship is really between an Employee playing
the role of manager and an Employee playing the role of team
member.
Figure 3.18: A class diagram showing the class in Figure 14 in its different roles
Note that you cannot model a class's role on a plain class diagram,
even though Figure 18 makes it appear that you can. In order to
use the role notation you will need to use the Internal Structure
notation, discussed next.
Pg 1
Internal Structures
One of the more useful features of UML 2 structure diagrams is the
new internal structure notation. It allows you to show how a class
or another classifier is internally composed. This was not possible
in UML 1.x, because the notation set limited you to showing only
the aggregation relationships that a class had. Now, in UML 2, the
internal structure notation lets you more clearly show how that
class's parts relate to each other.
Figure 3.19: A class diagram that only shows relationships between the objects
Pg 1
Figure3. 20: An example internal structure of a Plane class.
In Figure 3.20 the Plane has two ControlSoftware objects and each
one controls two engines. The ControlSoftware on the left side of
the diagram (control1) controls engines 1 and 2. The
ControlSoftware on the right side of the diagram (control2)
controls engines 3 and 4.
Conclusion
There are at least two important reasons for understanding the
class diagram.
Developers will think the class diagram was created specially for
them; but other team members will find them useful, too.
Pg 1
WEEK Five
COMPOSITE DIAGRAM
Introduction
Part
Interfaces
Pg 1
An interface is similar to a class but with a number of restrictions.
All interface operations are public and abstract, and do not provide
any default implementation. All interface attributes must be
constants. However, while a class may only inherit from a single
super-class, it may implement multiple interfaces.
Note that the circle notation does not show the interface
operations. When interfaces are shown as being owned by classes,
they are referred to as exposed interfaces. An exposed interface
can be defined as either provided or required. A provided interface
is an affirmation that the containing classifier supplies the
operations defined by the named interface element and is defined
by drawing a realization link between the class and the interface. A
required interface is a statement that the classifier is able to
communicate with some other classifier which provides operations
defined by the named interface element and is defined by drawing
a dependency link between the class and the interface.
Pg 1
Delegate
A delegate connector is used for defining the internal workings of a
component's external ports and interfaces. A delegate connector is
shown as an arrow with a «delegate» keyword. It connects an
external contract of a component as shown by its ports to the
internal realization of the behavior of the component's part.
Collaboration
A collaboration defines a set of co-operating roles used collectively
to illustrate a specific functionality. A collaboration should only
show the roles and attributes required to accomplish its defined
task or function. Isolating the primary roles is an exercise in
simplifying the structure and clarifying the behavior, and also
provides for re-use. A collaboration often implements a pattern.
Pg 1
A collaboration element is shown as an ellipse.
Role Binding
A role binding connector is drawn from a collaboration to the
classifier that fulfils the role. It is shown as a dashed line with the
name of the role at the classifier end.
Represents
A represents connector may be drawn from a collaboration to a
classifier to show that a collaboration is used in the classifier. It is
shown as a dashed line with arrowhead and the keyword
«represents».
Pg 1
Occurrence
An occurrence connector may be drawn from a collaboration to a
classifier to show that a collaboration represents (sic) the
classifier. It is shown as a dashed line with arrowhead and the
keyword «occurrence».
WEEK Six
Introduction
The component diagram's main purpose is to show the structural
relationships between the components of a system. In UML 1.1, a
component represented implementation items, such as files and
executables. Unfortunately, this conflicted with the more common
use of the term component," which refers to things such as COM
components. Over time and across successive releases of UML, the
original UML meaning of components was mostly lost. UML 2
officially changes the essential meaning of the component concept;
Pg 1
in UML 2, components are considered autonomous, encapsulated
units within a system or subsystem that provide one or more
interfaces. Although the UML 2 specification does not strictly state
it, components are larger design units that represent things that
will typically be implemented using replaceable" modules. But,
unlike UML 1.x, components are now strictly logical, design-time
constructs. The idea is that you can easily reuse and/or substitute
a different component implementation in your designs because a
component encapsulates behavior and implements specified
interfaces.
The notation
The component diagram notation set now makes it one of the
easiest UML diagrams to draw. Figure 6.1 shows a simple
component diagram using the former UML 1.4 notation; the
example shows a relationship between two components: an Order
System component that uses the Inventory System component. As
you can see, a component in UML 1.4 was drawn as a rectangle
with two smaller rectangles protruding from its left side.
Pg 1
Figure 5.1: This simple component diagram shows the Order System's general
dependency using UML 1.4 notation
Figure 6.3: The additional compartment here shows the interfaces that the Order
component provides and requires.
Pg 1
In the example Order component shown in Figure 6.3, the
component provides the interfaces of OrderEntry and
AccountPayable. Additionally, the component also requires another
component that provides the Person interface.
Pg 1
Figure 6.5: A component diagram that shows how the Order System component
depends on other components
Figure 6.5 shows that the Order System component depends both
on the Customer Repository and Inventory System components.
Notice in Figure 6.5 the duplicated names of the interfaces
CustomerLookup" and ProductAccessor." While this may seem
unnecessarily repetitive in this example, the notation actually
allows for different interfaces (and differing names) on each
component depending on the implementation differences (e.g.,
one component provides an interface that is a subclass of a
smaller required interface).
Subsystems
In UML 2 the subsystem classifier is a specialized version of a
component classifier. Because of this, the subsystem notation
element inherits all the same rules as the component notation
element. The only difference is that a subsystem notation element
has the keyword of subsystem" instead of component," as shown
in Figure 6.6.
You will also notice in Figure 6.7 that the interconnections between
the inner components are different from those shown in Figure
6.5. This is because these depictions of internal structures are
really collaboration diagrams nested inside the classifier (a
component, in our case), since collaboration diagrams show
instances or roles of classifiers. The relationship modelled between
the internal components is drawn with what UML calls an assembly
connector." An assembly connector ties one component's provided
interface with another component's required interface. Assembly
connectors are drawn as lollipop and socket symbols next to each
other. Drawing these assembly connectors in this manner makes
the lollipop and socket symbols very easy to read.
Conclusion
The component diagram is a very important diagram that
architects will often create early in a project. However, the
component diagram's usefulness spans the life of the system.
Component diagrams are invaluable because they model and
document a system's architecture. Because component diagrams
document a system's architecture, the developers and the
eventual system administrators of the system find this work
product-critical in helping them understand the system.
Pg 1
WEEK Seven
Object Diagrams
Pg 1
Example Class and Object Diagrams
The following diagram shows an object diagram with its defining
class diagram inset, and it illustrates the way in which an object
diagram may be used to test the multiplicities of assignments in
class diagrams. The car class has a 1-to-many multiplicity to the
wheel class, but if a 1-to-4 multiplicity had been chosen instead,
that wouldn’t have allowed for the three-wheeled car shown in the
object diagram.
Pg 1
Package Diagrams
Pg 1
Elements contained in a package share the same namespace.
Therefore, the elements contained in a specific namespace must
have unique names.
Packages can be built to represent either physical or logical
relationships. When choosing to include classes in specific
packages, it is useful to assign the classes with the same
inheritance hierarchy to the same package. There is also a strong
argument for including classes that are related via composition,
and classes that collaborate with them, in the same package.
Packages are represented in UML 2.1 as folders and contain the elements
that share a namespace; all elements within a package must be
identifiable, and so have a unique name or type. The package must show
Pg 1
the package name and can optionally show the elements within the
package in extra compartments.
Package Merge
A «merge» connector between two packages defines an implicit
generalization between elements in the source package, and elements
with the same name in the target package. The source element
definitions are expanded to include the element definitions contained in
the target. The target element definitions are unaffected, as are the
definitions of source package elements that don't match names with any
element in the target package.
Package Import
The «import» connector indicates that the elements within the target
package, which in this example is a single class, use unqualified names
when being referred to from the source package. The source package's
namespace gains access to the target classes; the target's namespace is
not affected.
Nesting Connectors
The nesting connector between the target package and source packages
shows that the source package is fully contained in the target package.
WEEK Eight
DEPLOYMENT
Deployment Diagrams
Pg 1
Node Instance
A node instance can be shown on a diagram. An instance can be
distinguished from a node by the fact that its name is underlined and has
a colon before its base node type. An instance may or may not have a
name before the colon. The following diagram shows a named instance of
a computer.
Node Stereotypes
A number of standard stereotypes are provided for nodes, namely
«cdrom», «cd-rom», «computer», «disk array», «pc», «pc client», «pc
server», «secure», «server», «storage», «unix server», «user pc». These
will display an appropriate icon in the top right corner of the node symbol
Artifact
An artifact is a product of the software development process. That may
include process models (e.g. use case models, design models etc),
Pg 1
source files, executables, design documents, test reports, prototypes,
user manuals, etc.
An artifact is denoted by a rectangle showing the artifact name, the
«artifact» keyword and a document icon, as shown below.
Association
In the context of a deployment diagram, an association represents a
communication path between nodes. The following diagram shows a
deployment diagram for a network, depicting network protocols as
stereotypes, and multiplicities at the association ends.
Node as Container
Pg 1
A node can contain other elements, such as components or artifacts. The
following diagram shows a deployment diagram for part of an embedded
system, depicting an executable artifact as being contained by the
motherboard node.
Pg 1
WEEK Nine
Activity Diagrams
In UML, an activity diagram is used to display the sequence of activities.
Activity diagrams show the workflow from a start point to the finish point
detailing the many decision paths that exist in the progression of events
contained in the activity. They may be used to detail situations where
parallel processing may occur in the execution of some activities. Activity
diagrams are useful for business modelling where they are used for
detailing the processes involved in business activities.
Pg 1
An Example of an activity diagram is shown below.
Activities
An activity is the specification of a parameterized sequence of behaviour.
An activity is shown as a round-cornered rectangle enclosing all the
actions, control flows and other elements that make up the activity.
Actions
An action represents a single step within an activity. Actions are denoted
by round-cornered rectangles.
Pg 1
Action Constraints
Constraints can be attached to an action. The following diagram shows
an action with local pre- and post-conditions.
Control Flow
A control flow shows the flow of control from one action to the next. Its
notation is a line with an arrowhead.
Pg 1
Initial Node
An initial or start node is depicted by a large black spot, as shown below.
Final Node
There are two types of final node: activity and flow final nodes.
The activity final node is depicted as a circle with a dot inside.
The difference between the two node types is that the flow final
node denotes the end of a single control flow; the activity final
node denotes the end of all control flows within the activity.
Pg 1
An object flow is shown as a connector with an arrowhead
denoting the direction the object is being passed.
Pg 1
Decision and Merge Nodes
Decision nodes and merge nodes have the same notation: a
diamond shape. They can both be named. The control flows
coming away from a decision node will have guard conditions
which will allow control to flow if the guard condition is met. The
following diagram shows use of a decision node and a merge node.
Exception Handlers
Exception Handlers can be modelled on activity diagrams as in the
example below.
Pg 1
Partition
An activity partition is shown as either a horizontal or vertical
swimlane. In the following diagram, the partitions are used to
separate actions within an activity into those performed by the
accounting department and those performed by the customer.
Pg 1
WEEK Ten
THE USE CASE MODEL
The use case model captures the requirements of a system. Use
cases are a means of communicating with users and other
stakeholders what the system is intended to do.
Pg 1
The uses connector can optionally have multiplicity values at each
end, as in the following diagram, which shows a customer may
only have one withdrawal session at a time, but a bank may have
any number of customers making withdrawals concurrently.
Requirements
The requirements define the formal functional requirements that a use
case must supply to the end user. They correspond to the functional
specifications found in structured methodologies. A requirement is a
contract or promise that the use case will perform an action or provide
some value to the system.
Constraints
A constraint is a condition or restriction that a use case operates under
and includes pre-, post- and invariant conditions. A precondition specifies
the conditions that need to be met before the use case can proceed. A
post-condition is used to document the change in conditions that must be
true after the execution of the use case. An invariant condition specifies
the conditions that are true throughout the execution of the use case .
Scenarios
A Scenario is a formal description of the flow of events that occur during
the execution of a use case instance. It defines the specific sequence of
events between the system and the external actors. It is normally
Pg 1
described in text and corresponds to the textual representation of the
sequence diagram.
Extension Points
The point at which an extending use case is added can be defined
by means of an extension point.
Pg 1
System Boundary
It is usual to display use cases as being inside the system and
actors as being outside the system.
Pg 1
WEEK Eleven
THE STATE MACHINE MODEL
A state machine diagram models the behaviour of a single object,
specifying the sequence of events that an object goes through
during its lifetime in response to events.
States
A state is denoted by a round-cornered rectangle with the name of
the state written inside it.
Pg 1
Initial and Final States
The initial state is denoted by a filled black circle and may be
labelled with a name. The final state is denoted by a circle with a
dot inside and may also be labelled with a name.
Transition s
Transitions from one state to the next are denoted by lines with
arrowheads. A transition may have a trigger, a guard and an
effect, as below.
State Actions
Pg 1
In the transition example above, an effect was associated with the
transition. If the target state had many transitions arriving at it,
and each transition had the same effect associated with it, it would
be better to associate the effect with the target state rather than
the transitions. This can be done by defining an entry action for
the state. The diagram below shows a state with an entry action
and an exit action.
Self-Transitions
A state can have a transition that returns to itself, as in the
following diagram. This is most useful when an effect is associated
with the transition.
Compound States
A state machine diagram may include sub-machine diagrams, as in
the example below.
Pg 1
The alternative way to show the same information is as follows.
Pg 1
The notation in the above version indicates that the details of the
Check PIN sub-machine are shown in a separate diagram.
Entry Point
Sometimes you won’t want to enter a sub-machine at the normal
initial state. For example, in the following sub-machine it would be
normal to begin in the "Initializing" state, but if for some reason it
wasn’t necessary to perform the initialization, it would be possible
to begin in the "Ready" state by transitioning to the named entry
point.
Pg 1
The following diagram shows the state machine one level up.
Exit Point
In a similar manner to entry points, it is possible to have named
alternative exit points. The following diagram gives an example
where the state executed after the main processing state depends
on which route is used to transition out of the state.
Pg 1
Choice Pseudo-State
A choice pseudo-state is shown as a diamond with one transition
arriving and two or more transitions leaving. The following
diagram shows that whichever state is arrived at, after the choice
pseudostate, is dependent on the message format selected during
execution of the previous state.
Junction Pseudo-State
Junction pseudo-states are used to chain together multiple
Pg 1
transitions. A single junction can have one or more incoming, and
one or more outgoing, transitions; a guard can be applied to each
transition. Junctions are semantic-free. A junction which splits an
incoming transition into multiple outgoing transitions realizes a
static conditional branch, as opposed to a choice pseudo-state
which realizes a dynamic conditional branch.
Terminate Pseudo-State
Entering a terminate pseudo-state indicates that the lifeline of the
state machine has ended. A terminate pseudo-state is notated as a
cross.
History States
A history state is used to remember the previous state of a state
machine when it was interrupted. The following diagram illustrates
Pg 1
the use of history states. The example is a state machine
belonging to a washing machine.
Concurrent Regions
A state may be divided into regions containing sub-states that
exist and execute concurrently. The example below shows that
within the state "Applying Brakes", the front and rear brakes will
be operating simultaneously and independently. Notice the use of
fork and join pseudo-states, rather than choice and merge pseudo-
states. These symbols are used to synchronize the concurrent
threads.
Pg 1
Pg 1
WEEK Twelve
Communication Diagrams
A communication diagram, formerly called a collaboration diagram, is an
interaction diagram that shows similar information to sequence diagrams
but its primary focus is on object relationships.
Pg 1
Pg 1
SEQUENCE DIAGRAMS
A sequence diagram is a form of interaction diagram which shows objects
as lifelines running down the page, with their interactions over time
represented as messages drawn as arrows from the source lifeline to the
target lifeline.
The sequence diagram is used primarily to show the interactions between objects in
the sequential order that those interactions occur. Much like the class diagram,
developers typically think sequence diagrams were meant exclusively for them.
However, an organization's business staff can find sequence diagrams useful to
communicate how the business currently works by showing how various business
objects interact. Besides documenting an organization's current affairs, a
businesslevel sequence diagram can be used as a requirements document to
communicate requirements for a future system implementation. During the
requirements phase of a project, analysts can take use cases to the next level by
providing a more formal level of refinement. When that occurs, use cases are often
refined into one or more sequence diagrams.
Lifelines
A lifeline represents an individual participant in a sequence diagram. A
lifeline will usually have a rectangle containing its object name. If its
name is "self", that indicates that the lifeline represents the classifier
which owns the sequence diagram.
Message s
Execution Occurrence
Self Message
A self message can represent a recursive call of an operation, or one
method calling another method belonging to the same object. It is shown
as creating a nested focus of control in the lifeline’s execution
occurrence.
Lost messages are those that are either sent but do not arrive at the
intended recipient, or which go to a recipient not shown on the current
diagram. Found messages are those that arrive from an unknown sender,
or from a sender not shown on the current diagram. They are denoted
going to or coming from an endpoint element.
Pg 1
Lifeline Start and En d
A lifeline may be created or destroyed during the timescale represented
by a sequence diagram. In the latter case, the lifeline is terminated by a
stop symbol, represented as a cross. In the former case, the symbol at
the head of the lifeline is shown at a lower level down the page than the
symbol of the object that caused the creation. The following diagram
shows an object being created and destroyed.
Pg 1
Duration and Time Constraints
By default, a message is shown as a horizontal line. Since the lifeline
represents the passage of time down the screen, when modelling a
realtime system, or even a time-bound business process, it can be
important to consider the length of time it takes to perform actions. By
setting a duration constraint for a message, the message will be shown
as a sloping line.
Combined Fragments
It was stated earlier that sequence diagrams are not intended for
showing complex procedural logic. While this is the case, there are a
number of mechanisms that do allow for adding a degree of procedural
logic to diagrams and which come under the heading of combined
fragments. A combined fragment is one or more processing sequence
enclosed in a frame and executed under specific named circumstances.
The fragments available are:
Pg 1
• Break fragment models an alternative sequence of events
that is processed instead of the whole of the rest of the
diagram.
• Parallel fragment (denoted “par”) models concurrent
processing.
• Weak sequencing fragment (denoted “seq”) encloses a
number of sequences for which all the messages must be
processed in a preceding segment before the following
segment can start, but which does not impose any
sequencing within a segment on messages that don’t share a
lifeline.
• Strict sequencing fragment (denoted “strict”) encloses a
series of messages which must be processed in the given
order.
• Negative fragment (denoted “neg”) encloses an invalid series
of messages.
• Critical fragment encloses a critical section.
• Ignore fragment declares a message or message to be of no
interest if it appears in the current context.
• Consider fragment is in effect the opposite of the ignore
fragment: any message not included in the consider
fragment should be ignored.
• Assertion fragment (denoted “assert”) designates that any
sequence not shown as an operand of the assertion is
invalid.
• Loop fragment encloses a series of messages which are
repeated.
Pg 1
There is also an interaction occurrence, which is similar to a
combined fragment. An interaction occurrence is a reference to
another diagram which has the word "ref" in the top left corner of
the frame, and has the name of the referenced diagram shown in
the middle of the frame.
Gate
Pg 1
Part Decomposition
An object can have more than one lifeline coming from it. This allows for
inter- and intra-object messages to be displayed on the same diagram.
Pg 1
State Invariant / Continuations
A state invariant is a constraint placed on a lifeline that must be true at
run-time. It is shown as a rectangle with semi-circular ends.
Pg 1
A continuation has the same notation as a state invariant, but is
used in combined fragments and can stretch across more than one
lifeline.
WEEK Thirteen
Interaction Occurrence
Interaction occurrences are references to existing interaction
diagrams. An interaction occurrence is shown as a reference
frame; that is, a frame with "ref" in the top-left corner. The name
of the diagram being referenced is shown in the center of the
frame.
Pg 1
Interaction Element
All the same controls from activity diagrams (fork, join, merge,
etc.) can be used on interaction overview diagrams to put the
control logic around the lower level diagrams. The following
example depicts a sample sale process, with sub-processes
abstracted within interaction occurrences.
Pg 1
THE TIMING DIAGRAM
Pg 1
These are a specific type of interaction diagram, where the focus is
on timing constraints.
State Lifeline
A state lifeline shows the change of state of an item over time. The
X-axis displays elapsed time in whatever units are chosen, while
the Y-axis is labelled with a given list of states. A state lifeline is
shown below.
Value Lifeline
A value lifeline shows the change of value of an item over time. The
Xaxis displays elapsed time in whatever units are chosen, the same as
for the state lifeline. The value is shown between the pair of horizontal
lines which cross over at each change in value. A value lifeline is shown
below.
Pg 1
Putting it all Together
State and value Lifelines can be stacked one on top of another in any
combination. They must have the same X-axis. Messages can be passed
from one lifeline to another. Each state or value transition can have a
defined event, a time constraint which indicates when an event must
occur, and a duration constraint which indicates how long a state or
value must be in effect for. Once these have all been applied, a timing
diagram may look like the following.
Pg 1
WEEK Fourteen
Introduction
So far we have defined and gained an overview of what the Unified
Modelling Language stands for and what all the diagrams that
make up UML mean. Because UML is essentially a set of diagrams,
you can simply draw them by hand on a piece of paper. But,
drawing UML diagrams on a piece of paper is certainly not a best
practice to design systems. Software applications simplify the task
of drawing diagrams of software designs. In addition, because the
design is in an electronic format, archiving the design for future
use, collaborating on the design becomes much easier. Also,
routine tasks can be automated by using a UML tool. Hence, using
a UML tool is by far the most preferred way for designing software
applications.
Pg 1
activity, state, and collaboration diagrams and the
component and deployment diagrams that form the
implementation view of the system.
Template-driven modelling
Re-usability is the key to improving productivity. An application
design may consist of several classes with relationships defined.
Quite a few times, while designing applications, you encounter the
same design problems or scenarios and end up defining the same
design again and again. By using a modelling tool, you can define
certain components or even subsystems that might potentially be
reusable in the future. For example, design elements of an
application used to define access to the database using, say, a
ConnectionPool class are potentially reusable. You might need to
define a similar database connection pool in another application as
well. Hence, it would benefit us in the long run if we design the
ConnectionPool class separately. We then can include the
ConnectionPool design in any future subsystems and avoid the
need of reinventing the wheel.
Such reusable designs or models are termed as templates and the
entire modeling process involving the identification and use of
templates is called template-driven modeling. The benefits of
template-driven modeling are apparent in the savings in design
time. You can consider model templates to be very similar to
reusable code libraries used in application development.
Pg 1
• Rational Rose: No discussion of UML tools is complete
without the mention of the Rational Rose modelling tool from
Rational Software Corporation. Rational Rose (the Rose
stands for "Rational Object-oriented Software Engineering")
is a visual modelling tool for UML. It comes in different
versions suited to different requirements. Rational Rose
provides support for all the standard features that we
discussed in the previous section such as UML diagram
support, forward and reverse engineering support, and
documentation and roundtrip engineering support. Apart
from this, Rational Rose also provides support for version
control, IDE integration, design pattern modelling, test script
generation, and collaborative modelling environment. In
addition, Rational Rose also supports the designing of data
models within the same environment. An interesting feature
of Rational Rose is the ability to publish the UML diagrams as
a set of Web pages and images. This enables you to share
and distribute your application design where the Rational
Rose tool is not installed.
Pg 1
Gentleware has not forgotten its open source moorings and
offers the Poseidon for UML Community Edition 1.5 free for
individual software developers.
Integration of UML Tools with Integrated Development
Environments (IDEs)
One interesting feature in UML tools that we discussed in the
previous section was round-trip engineering. For round-trip
engineering to be useful, we need to have the UML tool to be used
in conjunction with an IDE. This integration of a UML tool with the
IDE will help you to really benefit from round-trip engineering. Any
changes in the application code that you make in the IDE are
immediately reflected in the model in the UML tool and vice versa.
For our discussion, we will be considering IDEs for the Java
language.
Quite a few of the UML tools on the market can be integrated with
the popular IDEs such as IBM's WebSphere Studio, Borland's
JBuilder, WebGain's Visual Café, or Sun's Forte. For instance,
Rational Rose (Java edition) provides integration with all of these
popular IDEs. Together Control Center has a special version that
integrates with IBM's WebSphere Studio.
The downside of UML tool integration is that the integration
solution is proprietary to the UML tool vendor. Hence, you might
not always find a UML tool providing integration with popular IDEs
in the market. But all this is changing. (See box for details on the
Eclipse project.)
Eclipse
Eclipse is an open source effort that has tool integration as the
long-term goal. The interesting aspect of Eclipse is that the effort
is supported by major tool vendors. Eclipse aims to define across-
theboard integration standards that will enable vendors of different
tools to seamlessly work together and provide a cohesive and
single development environment. The beauty of Eclipse is that the
integration between tools is not a proprietary solution. In layman's
terms this means that, for example, you can buy an off-the-shelf
UML tool and integrate it into your development environment
without having to worry that you might be stuck with a particular
vendor or group of vendors. Eclipse is definitely an area to watch
out for in the near future! (www.eclipse.org)
WEEK Fourteen
Pg 1
CASE TOOL APPLICATION
The Altova UModel (2008)
UModel® 2008 Enterprise Edition is an affordable UML modeling
application with a rich visual interface and superior usability
features to help level the UML learning curve, and includes many
high-end functions to empower users with the most practical
aspects of the UML 2.1.2 specification. UModel is a 32-bit Windows
application that runs on Windows 2000 / 2003, Windows XP and
Windows Vista.
Pg 1
Introducing UModel
The UML is a complete modeling language but does not discuss, or
prescribe, the methodology for the development, code generation
and round-trip engineering processes. UModel has therefore been
designed to allow complete flexibility during the modeling process:
Support for Visual Basic .NET 9.0 and C# 3.0 as well as Visual
Studio .NET 2008, Java 1.6
Pg 1
Merging of projects is now supported
Sequence diagrams:
Automatic generation of (syntactically correct) replies when
adding messages to sequence diagrams.
Pg 1