SlideShare a Scribd company logo
UML 2.0 Changes
IT 792 – Model Driven Architecture
Weekly meeting: 01-Sept-2008
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)2
Disclaimer
• The UML 2.0 specification is huge and rich
• This presentation is NOT intended to be a detailed UML
2.0 specification… it’s only an early attempt
• This presentation will focus on the “end user” perspective
of changes in UML 2.0 – the meta-model changes may
be left out
• This presentation has been prepared for intra-team
session. Only for academic purpose. As part of course
“IT792 – MDA (research elective)” offered during Fall
2008 by Prof. Chandrashekar Ramanathan. International
Institute of Information Technology, Bangalore.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)3
“Take away” from this presentation
• Inclusions
 UML 1.x concepts
• Code samples generated in UML 1.x
 UML 2.0
• Requirement for a new standard
• Existing, enhanced and new diagrams.
 Resources {books, web links, tools and other
references}
• A few presumptions
 UML 1.x concepts
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)4
http://lh6.ggpht.com/_rY4Kf26lJ4U/Rqg8JQLUvdI/AAAAAAAAACU/0uAVE0KE1Bw/Evolution.jpg
Model – outcome++
Acknowledgement++
OOAD – class modeling Grady Booch
OOSE – use cases, transition
diagrams, and interaction
Ivar Jacobson
OMT – notation for diagrams,
dynamic quality of software
James Rumbaugh
10 -15 years… OOAD+OOSE+OMT
= Standardized development
language
Grady Booch, Ivar Jacobson and James
Rumbaugh @ Rational Software
UML  1.x (1997)  2.0 (2004) 
2.1.2 (Latest specification)
Standardisation by OMG – Object
Management Group
++
References: Learning UML 2.0 (O’reilly) and www.omg.org
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)5
4+1 view model++
++ -
References: Learning UML 2.0 (O’reilly)[1]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)6
Larger landscape of systems design+
+
• Where it has been introduced originally
 UML 1.x
• Diagram types
– Use case – interactions between system and user
– Activity – sequential and parallel activities within your system
– Class – classes, types, interfaces, relationships
– Object – instances of classes defined in class diagram
– Sequence – interactions between system where timing is
important
– Communication* – way in which objects interact, similar to
sequence {* renamed in UML 2.0, originally Collaboration}
– State machine – various states of an object, events, change
condition
– Deployment – how system is deployed in real
++ -
quoted from Learning UML 2.0 {Russ and Kim, O’Reilly}.
First edition – April 2006, Indian reprint – January 2007.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)7
Larger landscape of systems design+
+
• What has been introduced originally
 UML 2.0
• Diagram types
– Timing – interactions between object where timing is important
– Composite structure – internals of a class or component, and
can describe class relationship
– Component* – important components within system and the
interfaces they used to interact with each other. {* UML 1.x, takes
a new meaning in UML 2.0, originally Collaboration}
– Package – hierarchical organization of groups of classes and
components
++ -
quoted from Learning UML 2.0 {Russ and Kim, O’Reilly}.
First edition – April 2006, Indian reprint – January 2007.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)8
UML 1.x sample code++
• Sample code {programming language Java}
 Boundary
 Control
 Entity
++ - Chapter 13, Mastering Rational Rose, BPB publication
Order_Boundary
D:001 - Root_D
Mat_PersonalIIITBSemes
D:001 - Root_D
Mat_PersonalIIITBSemes
D:001 - Root_D
Mat_PersonalIIITBSemes
D:001 - Root_D
Mat_PersonalIIITBSemes D:001 - Root_D
Mat_PersonalIIITBSemes
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)9
New in UML 2.0
• Highlights of UML 2.0++
Increased degree of precision – more automation,
less ambiguity. Computer programs generating
models.
Increased modularity - eases understanding for new
users, and better for proficient.
Flexible hierarchies added by OMG – ease in
modeling complex system.
RCC (Rationalization + clarification + consolidation) -
remove redundant, enhance, and refine.
++
- Reference: “What’s New in UMLTM
2.0 ?” by Bran Selic
IBM Canada. April 2005.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)10
Lets delve UML 2.0
• Modeling system workflow – Activity diagrams
• Modeling ordered interactions – Sequence
diagrams
• Focusing on Interaction Timing – Timing
diagrams
• Modeling class’s Internal structure – Composite
Structures
continued…
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)11
Lets delve in detail : UML 2.0
• Managing and Reusing Your System’s Part –
Component diagram
• Modeling an Object’s State – State Machine
diagrams
• OCL : Object Constraint Language
• Adapting UML: Profiles
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)12
Activity Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)13
Activity diagram (4+1 Process View)
• Use case – what system should do.
• Activity diagram – how system should
accomplish the goal.
 Activity diagrams are good at modeling ‘Business
processes’
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)14
Activity diagram[1] – how it looks
Actions – important
steps in activity.
Edge types –
incoming / outgoing
Node – start / end
Diamond – decision /
merge
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)15
Activity diagram[1] - Activity and
action
Action – Lather, Rinse, Dry
Activity name – Wash Car
Don’t mistake ‘Activity’ with ‘Action’.
Action is a step in overall activity
Note: Activity frame can be omitted
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)16
Activity diagram[1] - Decisions
Guard conditions – if then else condition e.g.
[authorized] or [not authorized].
Only one edge is followed based on what condition
evaluates to TRUE.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)17
Activity diagram[1] – Avoid multiple
guard condition evaluating TRUE
• Beware where multiple guard evaluate to TRUE
[item in stock] or [item out of
stock] and [rush order]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)18
Activity diagram[1] – Merges –
better be clear as much as possible:
UML 2.0
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)19
Activity diagram[1] – multiple task at
same time
Fork Join
Computer assembly shows how “forks” and “joins” work
in a complete activity diagram
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)20
Activity diagram[1] – time events
Representing a recurring event e.g. Update Progress
Bar every 1 second.
Hour glass – represent Time Event, and text on top of it
represents wait time. e.g. Wait for 3 days before Send
Bill after Ship Order.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)21
Activity diagram[1] – calling
activities or showing object
Pitchfork – To represent calling
other activity
Object node – Use object node to show an
activity flowing through an activity. Object
interactions, creation, modification or usage.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)22
Activity diagram[1] – showing
Actions input and output
An Order object is input to Approve Payment action and
output from Receive Order Request
An input or output pin.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)23
Activity diagram[1] – when an action
need only a part of object
Here, Approve payment action only need ‘Cost’ object as an
input from a ‘Order’ object.
Cost object is received using <<transformation>> to specify –
Only Cost from Order object.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)24
Activity diagram[1] – showing how
object change state during an
activity
Object ‘Order’ change state during an activity. Object state
change from [pending] to [approved]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)25
Activity diagram[1] – showing input
and output from an Activity
Above, Order object is input and output from Approve Payment
activity.
Note: When input and output are shown then initial and final
node are omitted.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)26
Activity diagram[1] – sending and
receiving signals
Example:
• Sending Credit Card details to card provider.
• Collecting response from credit card provider. Based on response ie. approved or
denied order status may be shipped or delayed.
Receive Response as start node. In this case Initial node
may be omitted.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)27
Activity diagram[1] – interrupting an
Activity
Interrupting event shown with a “Lightning bolt
arrow”.
Interruption region is shown by a dashed, rounded rectangle
around action which can be interrupted.
Diagram means – If Receive Cancellation is received while
Process Order is active, then interrupt activity and Cancel Order.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)28
Activity diagram[1] – ending a flow
Flow Final Node, a flow final node terminates its
path only – not the whole activity
Note: Be careful when using flow final node after a fork. When a
flow final node is reached, then all process are terminated
including all processes running before node. If you like to run all
forked process to run to completion, make sure to add a join.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)29
Activity diagram[1] – partition or
swimlanes
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)30
Activity diagram[1] – using
annotation
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)31
Managing complex Activity Diagrams
– connectors [1]
Connector – they come in pair
Note: If large number of different connectors are used, it can find
reader hard time pairing them.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)32
Managing complex Activity Diagrams
– expansions [1]
Expansion region – large dashed rectangle with four aligned
boxes on either side.
Usage – expansion regions show that action is performed for
each item in an input collection. e.g. Each bug report is
discussed, if bug is [real bug] then activity proceeds,
otherwise bug is discarded and flow for that input ends.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)33
Advanced Class Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)34
Advanced Class Diagrams[1] – class
relationships
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)35
Advanced Class Diagrams[1] –
multiple inheritance
Note: Though UML supports multiple inheritance, however
in practice many don’t. e.g. Java, C#.
Reason: such as addEntry(…) is present in both parent
classes, so function call need resolution rules. And rules
change from language to language.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)36
Advanced Class Diagrams[1] –
multiple inheritance
url – attribute not NULL
Rating – never less than 0
updateRating(…) – precondition {rating>=0}
Range specifier – “0 <= rating <= 5”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)37
Advanced Class Diagrams[1] –
abstract class
Abstract class – does not implement all
methods
Notation:
Methods – written in italics
Class name – written in italics
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)38
Advanced Class Diagrams[1] –
abstract class
BlogStore inherits Store, implements
abstract methods “ store(…) and
retrieve(…)”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)39
Advanced Class Diagrams[1] –
interface
Interface – does not implement any
methods.
C++ using abstract classes with no method
implementation.
Java / C# using special construct “interface”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)40
Advanced Class Diagrams[1] -
interface
Stereotype notation
Ball notation
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)41
Advanced Class Diagrams[1] –
interface, abstract and concrete
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)42
Advanced Class Diagrams[1] -
template
• “I know the class will have to work with other
classes, however at this stage I don’t know
what those classes end up being”.
 If you find yourself in a similar situation use
TEMPLATES
 With an extra dashed border on
top right corner.
 ‘E’ is just a placeholder, can be
used later to tell type of objects
class will need to store.
Notation
<<bind>> <E->BlogEntry>
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)43
Sequence Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)44
Sequence Diagrams[1]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)45
Sequence Diagrams[1]
• Events – smallest part of an interaction. An
event is any point in interaction where
something occurs.
• Interaction - smallest part in sequence diagram
where ‘message/signal’ is sent by one
participant to another.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)46
Sequence Diagrams[1] - message
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)47
Sequence Diagrams[1] – nested
message
When a message triggers more than one message at receiving side
before return statement to originating participant is made.
Definition
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)48
Sequence Diagrams[1] – message
arrow types
“A Return Message is Optional”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)49
Sequence Diagrams[1] –
asynchronous message
1. foo() – asynchronous message, without waiting for
return you can continue sending other messages.
 Implementation – ????
Multithreading feature programming language
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)50
Sequence Diagrams[1] –
destroy
Participant2: ParticipantClass2, is <<created>>
and <<destroyed>> during course of sequence
diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)51
Sequence Diagrams[1] – from Use
Case to Sequence Diagram
UseCase to create a regular blog account. [taken from
Learning UML 2.0 {by Kim and Russels, Oreilly}]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)52
Sequence Diagrams[1] – from Use
Case to Sequence Diagram
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)53
Sequence Diagrams[1] – from Use
Case to Sequence Diagram
Refining - Adding details and internals
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)54
Sequence Diagrams[1] – from Use
Case to Sequence Diagram
More details –
 <<destroy>> - :AuthorDetails
 Asynchronous – clickSubmit()
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)55
Sequence Diagrams[1] – Sequence
fragments (new in UML 2.0)
Definitions and details next slide
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)56
Sequence Diagrams[1] – Sequence
fragments (new in UML 2.0)
• Why need sequence fragments
• Managing complex, huge sequence diagram
• Representing loops, alternate flows, interactions
with organized and structured sequence diagram.
• How to represent
• Box that encloses interaction
• Nested interaction – one or more box inside a box
• Important distinguisher
• Operator on top left corner. Operator denotes type
of sequence fragment.
• Types
• opt, ref, assert, loop, break, alt… [ For more
details/types refer UML 2.0 in a Nutshell, Oreilly ]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)57
Sequence Diagrams[1] – using a
‘ref’ fragment
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)58
Communication Diagrams
(a.k.a Collaboration Diagrams in previous UML versions)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)59
Communication Diagrams[1] –
Display interaction links
Definition – Diagram showing interactions between participant.
Also, known as Collaboration Diagram in previous versions.
Simpler to represent than Sequence Diagrams.
Ingredients – Participants, Links and Messages.
CD vis a vis SD – Designer’s personal choice. Sequence
diagrams is preferred. True SD is complex, however why
compromise when we get more details. [for more details refer table 8.1
Learning UML 2.0, By Kim and Russel, Orielly]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)60
Communication Diagrams[1] –
nested messages
Message invocation order:
1.messageA()  {1.1messageC()  1.2messageD()} 
2.messageB()
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)61
Communication Diagrams[1] –
parallel messages
Message invocation order:
2a.messageB(), 2b.message() and
2c.messageC() all invoked at same time after
1.messageA()
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)62
Communication Diagrams[1] – same
message multiple times
Looping constraints
Looping constraint *[i=-0..9]
Guard condition [condition - true]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)63
Communication Diagrams[1] –
participant calling itself
When do we need it
 When an object calls its on method.
Talking to itself is acceptable in software world
otherwise it may sound absurd 
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)64
Communication Diagrams[1] – a
conversion from SD to CD
Our referenced SD: {built from Use Case “Create a Regular blog account”}
Click for TD
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)65
Communication Diagrams[1] – a
conversion from SD to CD
Identify participant involved
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)66
Communication Diagrams[1] – a
conversion from SD to CD
Establish link between all necessary participants, refer SD.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)67
Communication Diagrams[1] – a
conversion from SD to CD
Other steps {disclaimer, each step can be performed separately} – Add
messages  Nested messages  Guard conditions  Return
messages {for all details keep referring SD},.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)68
Timing Diagrams (new in UML
2.0)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)69
Timing Diagram[1]
• Definition
• Interaction diagram type, which give detailed timing
information. However, Timing diagram are not just about
timing information.
• Why we need them
• When you can model what events to take place, however
you want to show when they will take place and how
recipient reacts.
• Applications
• Real time applications, or applications where you want to
model / follow strict timing pattern.
• Analogy
• Similar to logic analyzer for a PCB (printed circuit board).
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)70
Timing Diagram[1] – a simple
diagram
A mail server with logic analyzer; modeled using a timing
diagram.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)71
Timing Diagram – exact time or
relative time measurements
Exact
measurement
Relative
measurement
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)72
Timing Diagram[1] – state diagram
States – { State1, State2, State3}
Participant – “p1”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)73
Timing Diagram[1] – more details
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)74
Timing Diagram[1] - events
Event – is shown as an arrow from a state (State2) in
participant (p1:Participant) to a state (State1) in other
participant (p2:Participant2)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)75
Timing Diagram[1] – timing
constraints
• What timing constraint gives us:-
• Tell how long given portion of interaction
should take place.
• Amount of time a participant remains in a
particular state.
• How long an event should take to be invoked
and received.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)76
Timing Diagram[1] – timing
constraints
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)77
Timing Diagrams[1] – constraint
format specification
Timing Constraint
(representation)
Description
{t .. t+5s} Duration of event or state should be 5s
or less
{<5s} Less formal, however equivalent to
{t..t+5s}
{>5s, <10s} Duration of event or state should be
less than 5s, but less than 10s
{t} Duration of event should be ‘t’ secs. It
is a relative time, and value of ‘t’ can
be anything
{t..t*5} Duration of event or state should be t
multiplied by 5. This is relative timing. (
‘t’ can be any value of time)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)78
Timing Diagrams[1] - constraint
format specification
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)79
Timing Diagrams[1] – arranging
participant on TD {a tip}
Easy to read, well organized
states
Untidy,
participant
misplaced
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)80
Timing Diagrams[1] – alternate
notation
• Timing diagrams represented below, will grow
big, unmanageable.
• With a increased participant count size of
diagram reaches a huge size so soon.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)81
Timing Diagrams[1] – alternate
notation
• To reduce size of diagram, follow the alternate
notation.
The alternate Timing Diagram Notation
Good when many states to represent.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)82
Timing Diagrams[1] – from SD to TD
• SD  Old “Create Blog account SD”.
• Click link to view  Referred Sequence Diagram
• Technique to generate TD from a given SD
 Place the participant correctly
• Rotate SD participant 90 degrees counter
clockwise {shown in next slide}
 Read sequence diagram to determine time of
events or states
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)83
Timing Diagrams[1] – rotating
participants “90º counterclockwise”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)84
Timing Diagrams[1] – read SD,
depict state or event time on TD
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)85
Interaction Overview Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)86
Interaction Overview Diagrams[1]
• Implements a bigger picture view
• IOD = {CD + SD + TD}
• IOD – define how different diagrams ie. CD, SD
and TD interact to solve
• A use case
– Or
• A particular system concern
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)87
Interaction Overview Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)88
Interaction Overview Diagrams[1] –
parts of diagram
lifelines subtitles show combined list of
participant involved in interactions within
overview
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)89
Interaction Overview Diagrams[1] –
creating IOD for a blog account
Legends
Create a New Regular Blog
Account
iod = interaction
overview diagram
sd = sequence diagram
cd = communication
diagram
td = timing diagram
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)90
Interaction Overview Diagrams[1] –
creating IOD for a blog account
sd =
expanded,
detailed
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)91
Interaction Overview Diagrams[1] –
creating IOD for a blog account
sd, cd and td
= all expanded,
detailed
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)92
Before we
Lets determine where we started from,
where we reached and what’s next
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)93
We started with
• Rev up of UML1.x code samples generated
using Rational Rose tool.
• UML (Unified Modeling Language) notations,
and where was each notation introduced i.e.
UML 1.x or UML 2.0
• Who, how, why and what UML 2.0 has been
incepted.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)94
We are introduced to
• Activity Diagrams
• Advanced Class Diagrams
• Sequence Diagrams
• Communication Diagrams (a.k.a. Collaboration
Diagrams)
• Timing Diagrams
• Interaction Overview Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)95
What’s next
• Composite Structures – modeling class’s internal
• Component Diagrams – managing and reusing
system’s part
• Packages – organizing model
• State Machine Diagrams – modeling an object’s state
• Deployment Diagrams – modeling deployed system
• UML profiles – adapting UML
• Object Constraint Language (OCL) – defining
constraints
• UML 2.0s tools – applying UML 2.0
• And questions ????
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)96
What we have to learn to do,
we learn by doing.
Aristotle++
++
- http://www.quoteworld.org/quotes/570
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)97
UML 2.0 Changes – Part 2
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)98
What’s next
• Composite Structures – modeling class’s internal
• Component Diagrams – managing and reusing system’s part
• Packages – organizing model
• State Machine Diagrams – modeling an object’s state
• Deployment Diagrams – modeling deployed system
• UML profiles – adapting UML
• Object Constraint Language (OCL) – defining constraints
• UML 2.0s tools – applying UML 2.0 {≠ Covered}
• And questions ????
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)99
Questions from previous
session
Do an input pin and an output pin exist in pairs?
 Not necessarily. See figure 14-214, Page 540-41 from “The Unified
Modeling Language Reference Manual” (see references for more
details)
• Interplay and interchange between diagram?
 Could not find much on same. Will try to cover as part of weekly
discussion.
• State diagram and Timing diagram ?
 Will be partly resolved when state diagrams are discussed.
However, will also be covered as part of answer to Interplay
between diagrams.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)100
Composite Structures (new in UML
2.0)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)101
Composite Structures[1]
• Definition
• Diagrams apart from, primary UML diagrams
such as class and sequence diagrams, to
show how objects work inside classes, how
objects can achieve the goal.
• Why we need them
• To reduce gaps which are difficult to fill with
class and sequence diagrams. Examples
subsequent examples.
• Types
• Internal Structures, Ports and Collaborations.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)102
Internal Structures[1]
• Definition
 Diagrams to show parts contained by a class
and the relationships between the parts.
• Example
Details in following slides
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)103
Internal Structures[1] - Example 
BlogEntry
Step 1 – BlogEntry is
composed of
Introduction and
MainBody
Step 2 – Improvement,
a MainEntry in
BlogEntry is
associated me with a
Introduction
Reason: Convenient for other
objects to ask an Introduction
object the MainBody object it
introduces.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)104
Internal Structures[1] - Example 
BlogEntry
An unintended but a valid object structure.
An intended object structure.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)105
Internal Structures[1] - Example 
BlogEntry
• Argument
 Class diagrams are not good at expressing how items
contained in a class relate. This is where Internal
Structures come handy.
• Counter argument
 An unintended structure shown previously can be
easily avoided while writing the code.
 Further, Sequence Diagrams can show object creation
and how they are connected.
• Then why to read
 Internal structures are convenient and simple way to
show relationship between contained items, especially
when contained items have a complex relationship.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)106
Internal Structures[1] – Conversion Class
to Internal Structures
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)107
Internal Structures[1] – more details
A BlogEntry can contain
zero (min) or three (max)
pic:Image objects.
Connectors represent how
parts interact with each
other.
Alternate notation
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)108
Internal Structures[1] – representing
associations
Association - Dashed outline
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)109
Composite Structure - Ports[1]
• Definition
 A port is a point between a class and the outside
world. Distinct way of using a class, usually by
different types of clients.
• Example
• A Wiki class with UserServices and
Maintenance capabilities.
• Drawn as small rectangle on the
boundary of a class.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)110
Composite Structures[1] - Ports
• Ports and interfaces
 Ports can be used group related interfaces to
show services available at that port.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)111
Composite Diagrams[1] –
Collaboration Diagrams
• Definition
• Diagram showing objects by the role they play
in a scenario and providing high-level textual
description of what objects are doing.
[ showing object interaction performing a ]
• Any similarities
• Object diagram. But collaboration diagram
differ in focus.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)112
Composite Structures[1] –
Collaboration and Sequence
Diagrams
Sequence Diagram -
”Implementing Chain Of
Responsibility design
pattern”
Collaboration
Diagram –
”Implementing Chain
Of Responsibility
design pattern”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)113
An alternate notation
Participant  placeholder of objects.
Connectors  temporary links; mean that the runtime
objects communicate during collaboration, but the objects
don’t have to communicate outside the collaboration.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)114
An real world example
 Object is not bound to a role; it can play different
roles in different collaborations.
 Objects in a collaboration are not owned by
collaboration; they may exist before and after
collaboration.
 Even though objects communicate in a
collaboration; they don’t necessarily communicate
outside the collaboration.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)115
Component Diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)116
Component Diagrams[1]
• Definition
• Encapsulated, reusable and replaceable part of
software.
• Good candidates
• Perform key functionality, and used frequently in
software. Examples loggers, XML parsers, shopping
cart.
• Capacities
• Generalize, associate with other classes. Implement
interfaces, have operations.
• Class vis a vis Component
• A component can use classes and other
components to perform its task.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)117
Component Diagrams[1] - parts
Basic Component Notation
An alternate Component Notation
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)118
Component Diagrams[1] - parts
Provided interfaces – provided services
Required interfaces – desired interfaces
OR Component Interfaces working together
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)119
Component Diagrams[1] – more
parts
Delegation connector
Assembly connector
Shows internal parts realize component
interfaces
Show components working together
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)120
Component diagrams – black box or
white box
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)121
Packages
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)122
Packages
• Definition
 Group of classes are modeled with packages. To
organize and avoid name collision among
classes.
• Examples
 Packages in Java, Namespaces in C#
• Notation
Credentials class is
located in security
package
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)123
Packages – dependencies and
visibilities
Dependencies
Users package imports only Credentials class
Visibility
“+” – public visibility
“-” – private visibility
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)124
Packages – managing packages
Changes in one can effect other. Tip
avoid cycles.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)125
Packages – managing packages
Solution – reduce to one package or factor out a new
package
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)126
State machine diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)127
State Machine Diagrams[1]
• Definition
 To show how state of an object or system is
important factor in its behavior.
 Add on to activity and other interaction diagrams.
• Applications
 Real time system / mission critical systems such
as Heart Monitoring System
 Dedicated devices whose behavior is defined in
terms of state such as ATM.
 Gaming application/s.
 Network communication protocols.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)128
State Machine Diagrams[1] -
essentials
Example : State Machine Diagram for a CD player.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)129
State Machine Diagrams – internal
behavior and transitions
Internal behavior – behavior when object
is in this state.
Internal transitions – transitions that cause reaction
within same state, but doesn’t cause object to
change state.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)130
Deployment diagrams
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)131
Deployment Diagrams[1]
• Definition
 Diagrams showing physical view of the system.
• Usage
 Show how software gets assigned to hardware
and how pieces communicate.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)132
Deployment Diagrams[1] – web
application
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)133
Deployment Diagrams[1] -
constituents
• Nodes
 Hardware or software resource that can host
software or related files.
• Types
 Hardware – server, desktop PC, disk drives
 Software – Operating System, J2EE container,
web server, application server.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)134
Deployment Diagrams[1] –
communication and specification
• Communication – how nodes communicate.
• Specification – an artifact specifying how
another artifact is deployed to a node.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)135
Object Constraint Language (OCL)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)136
Object Constraint Language[1]
• Need
 Defining constraints in a class diagram, or UML
diagrams in general.
• Alternate ways
 Programming language (C, Java) or natural language
• Issues
 Natural language ambiguous, Programming language
not understood by all
• Solution
 OMG proposed OCL
• Features – formal yet easy to understand language for
UML diagrams.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)137
Object Constraint Language[1] -
types
• OCL has four built in types
 Boolean – true; false
 Integer - 1, 2, 4534523532, -200
 Real – 2.3423432, 11.700000
 String – “MDA”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)138
Object Constraint Language[1]
-operators
Group Operators Supported
types
Examples
Arithmetic +,-,*, / Integer, Real “abc + def / ghi”
Additional arithmetic abs(), max(), min() Integer, Real marks.max(scorecard)
Comparison <, <=, >, >= Integer, Real abc > = 9
Equality =, <> All title <> ‘Idle’
Boolean and, or, xor, not Boolean isStudent and (nation
= “India”)
String concat(), size(),
substring(), toInteger(),
toReal()
String title.substring(1,8)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)139
Object Constraint Language[1] -
example
• Pulling it together
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)140
Object Constraint Language[1] –
constraint types
 Invariant
• Must always be true, otherwise system in invalid state.
Example : roll_numer always greater than zero.
 Pre conditions
• Defined on a method, checked before method executes.
 Post conditions
• Defined on a method, checks values after method
executes.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)141
Object Constraint Language[1] –
example
Sample constraint
context BlogEntry :: incrementRating (amount : int) : void
pre: amount < = 100
post: rating = rating@pre + amount
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)142
Object Constraint Language[1] -
automation
• OCL constraint from UML model to perform
constraint checking
• Enhance integration, from UML to runtime
model.
• Checking errors early, reduce debugging time.
• Tool support
 ArgoUML, ocl4java, and Dresden OCL Toolkit
• OCL tool support will become more mature with
advancement in MDA and Executable UML.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)143
UML Profiles
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)144
UML Profiles[1]
• Definition
 Way to adapt UML to a particular platform
J2EE, .NET or domain such aerospace, telecom,
or healthcare.
• Constituent
 Made up of stereotypes, tagged values and
constraints
• Earlier UML versions
 UML1.x allowed stereotypes on fly. Cause of
confusion to modelers.
 UML 2.0 fixed by declaring these stereotypes
and tagged values.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)145
UML Profiles [1] – stereotypes and
tagged values
• Stereotypes – signify element has special use
or intent.
 Define name of stereotype surrounded by angle
bracket or guillemots.
 No limit on number of stereotype applied to an
element.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)146
UML Profiles[1] – tagged values
• Definition – provide extra information to a
defined stereotype.
 Can apply multiple stereotype to an element,
each with its on tagged value.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)147
UML Profiles[1] – constraints
• Definition
 Constraints impose rules and restrictions on
model elements.
 Example in subsequent slide.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)148
UML Profiles[1] – creating a UML
profile
• When
 When standard OMG or toolspecific profile is
unable to express your model.
• How
 Extend UML meta-model or meta-class object to
define new stereotype.
 Enhance stereotype with tagged values.
 Define constraints to apply additional rules and
constraints.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)149
UML Profiles[1] – creating a UML
profile
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)150
UML Profiles[1] – why bother
• Real power comes when defining a new, or a
common vocabulary between domains.
• Leverage tools to generate automatic code.
• Examples:
 Omondo Eclipse Plugin provides J2EE profile
 OMG maintains some common profiles such as
for CORBA and testing. Testing profile provides
mapping to JUnit { commonly used Java unit
testing framework}
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)151
Wrap up
 UML 1.x and UML 2.0 from beginners to intermediate
levels.
 How to model a system with a simple WikiBlog
examples.
 Old, or enhanced features in UML 2.0
 New diagrams or notations in UML 2.0
 Introduction to Object Constraint Language
 Introduction to UML profiles
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)152
UML – Resource links (Tools and
books)
• OMG resources link
 Tools and tutorials
• http://www.uml.org/#Links-General
– The current UML specification for free download
– Standard UML Profiles and related specifications
– Articles about UML
– UML Resource Pages
– UML Tutorials
– And more
• Others
 Tools
• http://en.wikipedia.org/wiki/List_of_UML_tools
– List of UML tools maintained on Wikipedia.org
 Forum
• http://www.uml-forum.com/
– UML forum is a web community on Unified Modeling Language (UML)
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)153
References, recommendation and
copyrights information
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)154
References
[1] – Learning UML 2.0; by Kim Hamilton, Russell
Miles; Oreilly Publication
Recommended reading
The Unified Modelling Language Reference
Manual, Second Edition, by James Rumbaugh,
Ivar Jacobson, Grady Booch; Pearson
Education (LPE)
UML 2.0 in a Nutshell [Oreilly]
Mastering Rational Rose [BPB]
UML Toolkit [John Wiley and Sons]
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)155
References
• Web resources
 http://www.omg.org/
• For MDA, UML, OCL and XMI standards and other
specifications.
• Personal recommendation
 UML has extensive support in textbooks, toolkits and
on web.
 Most authentic and standard is OMG’s official website
{www.omg.org}.
 It is highly recommended that only standard
specification be followed.
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)156
Copyrights information
• OMG, UML, CORBA – Copyright © 1997-2008 Object
Management Group, Inc. All Rights Reserved.
• IBM – Copyright IBM Corporation 1994, 2008. All rights
reserved.
• JAVA, J2EE – Copyright © 1995-2008 Sun
Microsystems, Inc. 4150 Network Circle, Santa Clara,
California 95054, U.S.A. All rights reserved.
• C#, .Net – Copyright © Microsoft Corporation, Redmond
Washington. All rights reserved.
“All attempts have been made to acknowledge Copyrights and avoid infringement of terms,
trademarks of organizations. However, if in this material any information /
acknowledgement is found missing, please it be considered unintentional. ‘All Rights
Reserved’, trademarks, logos still to be considered property of respective organization
or standard.”
01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)157
“A spider conducts operations that resemble those
of a weaver, and a bee puts to shame many an
architect in the construction of her cells. But
what distinguishes the worst architect from
the best of bees is this, that the architect
raises his structure in imagination before he
erects it in reality. ”
— (Capital, Vol. I, Chap. 7, Pt. 1)
Karl Heinrich Marx++
++ - http://en.wikipedia.org/wiki/Karl_marx

More Related Content

Viewers also liked

Software evolution evangelisation
Software evolution evangelisationSoftware evolution evangelisation
Software evolution evangelisation
Nicolas Anquetil
 
10 software maintenance
10 software maintenance10 software maintenance
10 software maintenance
akiara
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
Rasan Samarasinghe
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
Indu Sharma Bhardwaj
 
Software Maintenance
Software MaintenanceSoftware Maintenance
Software Maintenance
Ameer Hasan Malik
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
Muhammad Asim
 
Programming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfProgramming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and Alf
Ed Seidewitz
 
Information systems development methodologies (autosaved)
Information systems development methodologies (autosaved)Information systems development methodologies (autosaved)
Information systems development methodologies (autosaved)
Vaska Shefteroska
 
Intro to Database Design
Intro to Database DesignIntro to Database Design
Intro to Database Design
Sondra Willhite
 
System Development Methodologies
System Development MethodologiesSystem Development Methodologies
System Development Methodologies
Devon Ravihansa
 
Software Evolution Visualization
Software Evolution VisualizationSoftware Evolution Visualization
Software Evolution Visualization
Manoel Mendonca
 
Dbms models
Dbms modelsDbms models
Dbms models
devgocool
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Dang Tuan
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
Raj Thilak S
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
Malek Sumaiya
 
Introduction to UML
Introduction to UMLIntroduction to UML
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Beat Signer
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
Free Open Source Software Technology Lab
 

Viewers also liked (18)

Software evolution evangelisation
Software evolution evangelisationSoftware evolution evangelisation
Software evolution evangelisation
 
10 software maintenance
10 software maintenance10 software maintenance
10 software maintenance
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 
Software Maintenance
Software MaintenanceSoftware Maintenance
Software Maintenance
 
Software Evolution
Software EvolutionSoftware Evolution
Software Evolution
 
Programming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and AlfProgramming in UML: An Introduction to fUML and Alf
Programming in UML: An Introduction to fUML and Alf
 
Information systems development methodologies (autosaved)
Information systems development methodologies (autosaved)Information systems development methodologies (autosaved)
Information systems development methodologies (autosaved)
 
Intro to Database Design
Intro to Database DesignIntro to Database Design
Intro to Database Design
 
System Development Methodologies
System Development MethodologiesSystem Development Methodologies
System Development Methodologies
 
Software Evolution Visualization
Software Evolution VisualizationSoftware Evolution Visualization
Software Evolution Visualization
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 Information Systems Analysis and Design Overview of OOAD, UML, and RUP Information Systems Analysis and Design Overview of OOAD, UML, and RUP
Information Systems Analysis and Design Overview of OOAD, UML, and RUP
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
Relational Database Design - Lecture 4 - Introduction to Databases (1007156ANR)
 
Relational Database Management System
Relational Database Management SystemRelational Database Management System
Relational Database Management System
 

Similar to UML 2.0 Changes

UoC SNAPT @ Thales 24/02/2012
UoC SNAPT @ Thales 24/02/2012UoC SNAPT @ Thales 24/02/2012
UoC SNAPT @ Thales 24/02/2012
Mariana Karmazi
 
Sql server ___________session 1(sql 2008)
Sql server  ___________session 1(sql 2008)Sql server  ___________session 1(sql 2008)
Sql server ___________session 1(sql 2008)
Ehtisham Ali
 
Accel_Series_2022Winter_En.ppt
Accel_Series_2022Winter_En.pptAccel_Series_2022Winter_En.ppt
Accel_Series_2022Winter_En.ppt
NTTDATA INTRAMART
 
Uml2 clearquest
Uml2 clearquestUml2 clearquest
Uml2 clearquest
Alexander Novichkov
 
MuleSoft Meetup Warsaw Group DataWeave 2.0
MuleSoft Meetup Warsaw Group DataWeave 2.0MuleSoft Meetup Warsaw Group DataWeave 2.0
MuleSoft Meetup Warsaw Group DataWeave 2.0
Patryk Bandurski
 
Agile Modeling using the Architecture Tools in VS 2010
Agile Modeling  using the Architecture Tools in VS 2010Agile Modeling  using the Architecture Tools in VS 2010
Agile Modeling using the Architecture Tools in VS 2010
Gary Pedretti
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Ürgo Ringo
 
unit 3 software requirement and analysis-1.ppt
unit 3 software requirement and analysis-1.pptunit 3 software requirement and analysis-1.ppt
unit 3 software requirement and analysis-1.ppt
SomnathMule5
 
Pratk kambe rac
Pratk kambe racPratk kambe rac
Pratk kambe rac
Pratik Kambe
 
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
CleytonLAlves
 
Lecture-System_Contracts.pptx
Lecture-System_Contracts.pptxLecture-System_Contracts.pptx
Lecture-System_Contracts.pptx
SriCharan618997
 
UML
UMLUML
Pr full uml
Pr full umlPr full uml
Pr full uml
CM-Consult
 
10 component diagram
10 component diagram10 component diagram
10 component diagram
Baskarkncet
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
Andrew Brust
 
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
Diana Gray, MBA
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
MariaDB plc
 
CMIS 330 WEEK 4 SDD
CMIS 330 WEEK 4 SDDCMIS 330 WEEK 4 SDD
CMIS 330 WEEK 4 SDD
HamesKellor
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App Services
Damir Dobric
 
T sql performance guidelines for better db stress powers
T sql performance guidelines for better db stress powersT sql performance guidelines for better db stress powers
T sql performance guidelines for better db stress powers
Shehap Elnagar
 

Similar to UML 2.0 Changes (20)

UoC SNAPT @ Thales 24/02/2012
UoC SNAPT @ Thales 24/02/2012UoC SNAPT @ Thales 24/02/2012
UoC SNAPT @ Thales 24/02/2012
 
Sql server ___________session 1(sql 2008)
Sql server  ___________session 1(sql 2008)Sql server  ___________session 1(sql 2008)
Sql server ___________session 1(sql 2008)
 
Accel_Series_2022Winter_En.ppt
Accel_Series_2022Winter_En.pptAccel_Series_2022Winter_En.ppt
Accel_Series_2022Winter_En.ppt
 
Uml2 clearquest
Uml2 clearquestUml2 clearquest
Uml2 clearquest
 
MuleSoft Meetup Warsaw Group DataWeave 2.0
MuleSoft Meetup Warsaw Group DataWeave 2.0MuleSoft Meetup Warsaw Group DataWeave 2.0
MuleSoft Meetup Warsaw Group DataWeave 2.0
 
Agile Modeling using the Architecture Tools in VS 2010
Agile Modeling  using the Architecture Tools in VS 2010Agile Modeling  using the Architecture Tools in VS 2010
Agile Modeling using the Architecture Tools in VS 2010
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
unit 3 software requirement and analysis-1.ppt
unit 3 software requirement and analysis-1.pptunit 3 software requirement and analysis-1.ppt
unit 3 software requirement and analysis-1.ppt
 
Pratk kambe rac
Pratk kambe racPratk kambe rac
Pratk kambe rac
 
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
9d9a98a8-4723-486c-8be1-c821336df48a.handout9918OG9918ExtendedStructuralWorkf...
 
Lecture-System_Contracts.pptx
Lecture-System_Contracts.pptxLecture-System_Contracts.pptx
Lecture-System_Contracts.pptx
 
UML
UMLUML
UML
 
Pr full uml
Pr full umlPr full uml
Pr full uml
 
10 component diagram
10 component diagram10 component diagram
10 component diagram
 
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012SQL Server Workshop for Developers - Visual Studio Live! NY 2012
SQL Server Workshop for Developers - Visual Studio Live! NY 2012
 
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
RPA Summer School Studio Session 4 AMER: Advanced practices with Studio and O...
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
CMIS 330 WEEK 4 SDD
CMIS 330 WEEK 4 SDDCMIS 330 WEEK 4 SDD
CMIS 330 WEEK 4 SDD
 
Microservices and Azure App Services
Microservices and Azure App ServicesMicroservices and Azure App Services
Microservices and Azure App Services
 
T sql performance guidelines for better db stress powers
T sql performance guidelines for better db stress powersT sql performance guidelines for better db stress powers
T sql performance guidelines for better db stress powers
 

More from manishthaper

UMLassure: An approach to model software security
UMLassure: An approach to model software securityUMLassure: An approach to model software security
UMLassure: An approach to model software security
manishthaper
 
Jazz - Collaborative Software Development
Jazz - Collaborative Software DevelopmentJazz - Collaborative Software Development
Jazz - Collaborative Software Development
manishthaper
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
manishthaper
 
Home care diagnostics system - Cntd
Home care diagnostics system - CntdHome care diagnostics system - Cntd
Home care diagnostics system - Cntd
manishthaper
 
Home care diagnostics system
Home care diagnostics systemHome care diagnostics system
Home care diagnostics system
manishthaper
 
Gudiya - Save her
Gudiya - Save herGudiya - Save her
Gudiya - Save her
manishthaper
 
Adam and Eve Condoms
Adam and Eve CondomsAdam and Eve Condoms
Adam and Eve Condoms
manishthaper
 
Transformation of work with Information Technology
Transformation of work with Information TechnologyTransformation of work with Information Technology
Transformation of work with Information Technology
manishthaper
 

More from manishthaper (8)

UMLassure: An approach to model software security
UMLassure: An approach to model software securityUMLassure: An approach to model software security
UMLassure: An approach to model software security
 
Jazz - Collaborative Software Development
Jazz - Collaborative Software DevelopmentJazz - Collaborative Software Development
Jazz - Collaborative Software Development
 
Rejunevating software reengineering processes
Rejunevating software reengineering processesRejunevating software reengineering processes
Rejunevating software reengineering processes
 
Home care diagnostics system - Cntd
Home care diagnostics system - CntdHome care diagnostics system - Cntd
Home care diagnostics system - Cntd
 
Home care diagnostics system
Home care diagnostics systemHome care diagnostics system
Home care diagnostics system
 
Gudiya - Save her
Gudiya - Save herGudiya - Save her
Gudiya - Save her
 
Adam and Eve Condoms
Adam and Eve CondomsAdam and Eve Condoms
Adam and Eve Condoms
 
Transformation of work with Information Technology
Transformation of work with Information TechnologyTransformation of work with Information Technology
Transformation of work with Information Technology
 

Recently uploaded

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 

Recently uploaded (20)

Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 

UML 2.0 Changes

  • 1. UML 2.0 Changes IT 792 – Model Driven Architecture Weekly meeting: 01-Sept-2008
  • 2. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)2 Disclaimer • The UML 2.0 specification is huge and rich • This presentation is NOT intended to be a detailed UML 2.0 specification… it’s only an early attempt • This presentation will focus on the “end user” perspective of changes in UML 2.0 – the meta-model changes may be left out • This presentation has been prepared for intra-team session. Only for academic purpose. As part of course “IT792 – MDA (research elective)” offered during Fall 2008 by Prof. Chandrashekar Ramanathan. International Institute of Information Technology, Bangalore.
  • 3. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)3 “Take away” from this presentation • Inclusions  UML 1.x concepts • Code samples generated in UML 1.x  UML 2.0 • Requirement for a new standard • Existing, enhanced and new diagrams.  Resources {books, web links, tools and other references} • A few presumptions  UML 1.x concepts
  • 4. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)4 http://lh6.ggpht.com/_rY4Kf26lJ4U/Rqg8JQLUvdI/AAAAAAAAACU/0uAVE0KE1Bw/Evolution.jpg Model – outcome++ Acknowledgement++ OOAD – class modeling Grady Booch OOSE – use cases, transition diagrams, and interaction Ivar Jacobson OMT – notation for diagrams, dynamic quality of software James Rumbaugh 10 -15 years… OOAD+OOSE+OMT = Standardized development language Grady Booch, Ivar Jacobson and James Rumbaugh @ Rational Software UML  1.x (1997)  2.0 (2004)  2.1.2 (Latest specification) Standardisation by OMG – Object Management Group ++ References: Learning UML 2.0 (O’reilly) and www.omg.org
  • 5. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)5 4+1 view model++ ++ - References: Learning UML 2.0 (O’reilly)[1]
  • 6. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)6 Larger landscape of systems design+ + • Where it has been introduced originally  UML 1.x • Diagram types – Use case – interactions between system and user – Activity – sequential and parallel activities within your system – Class – classes, types, interfaces, relationships – Object – instances of classes defined in class diagram – Sequence – interactions between system where timing is important – Communication* – way in which objects interact, similar to sequence {* renamed in UML 2.0, originally Collaboration} – State machine – various states of an object, events, change condition – Deployment – how system is deployed in real ++ - quoted from Learning UML 2.0 {Russ and Kim, O’Reilly}. First edition – April 2006, Indian reprint – January 2007.
  • 7. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)7 Larger landscape of systems design+ + • What has been introduced originally  UML 2.0 • Diagram types – Timing – interactions between object where timing is important – Composite structure – internals of a class or component, and can describe class relationship – Component* – important components within system and the interfaces they used to interact with each other. {* UML 1.x, takes a new meaning in UML 2.0, originally Collaboration} – Package – hierarchical organization of groups of classes and components ++ - quoted from Learning UML 2.0 {Russ and Kim, O’Reilly}. First edition – April 2006, Indian reprint – January 2007.
  • 8. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)8 UML 1.x sample code++ • Sample code {programming language Java}  Boundary  Control  Entity ++ - Chapter 13, Mastering Rational Rose, BPB publication Order_Boundary D:001 - Root_D Mat_PersonalIIITBSemes D:001 - Root_D Mat_PersonalIIITBSemes D:001 - Root_D Mat_PersonalIIITBSemes D:001 - Root_D Mat_PersonalIIITBSemes D:001 - Root_D Mat_PersonalIIITBSemes
  • 9. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)9 New in UML 2.0 • Highlights of UML 2.0++ Increased degree of precision – more automation, less ambiguity. Computer programs generating models. Increased modularity - eases understanding for new users, and better for proficient. Flexible hierarchies added by OMG – ease in modeling complex system. RCC (Rationalization + clarification + consolidation) - remove redundant, enhance, and refine. ++ - Reference: “What’s New in UMLTM 2.0 ?” by Bran Selic IBM Canada. April 2005.
  • 10. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)10 Lets delve UML 2.0 • Modeling system workflow – Activity diagrams • Modeling ordered interactions – Sequence diagrams • Focusing on Interaction Timing – Timing diagrams • Modeling class’s Internal structure – Composite Structures continued…
  • 11. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)11 Lets delve in detail : UML 2.0 • Managing and Reusing Your System’s Part – Component diagram • Modeling an Object’s State – State Machine diagrams • OCL : Object Constraint Language • Adapting UML: Profiles
  • 12. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)12 Activity Diagrams
  • 13. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)13 Activity diagram (4+1 Process View) • Use case – what system should do. • Activity diagram – how system should accomplish the goal.  Activity diagrams are good at modeling ‘Business processes’
  • 14. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)14 Activity diagram[1] – how it looks Actions – important steps in activity. Edge types – incoming / outgoing Node – start / end Diamond – decision / merge
  • 15. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)15 Activity diagram[1] - Activity and action Action – Lather, Rinse, Dry Activity name – Wash Car Don’t mistake ‘Activity’ with ‘Action’. Action is a step in overall activity Note: Activity frame can be omitted
  • 16. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)16 Activity diagram[1] - Decisions Guard conditions – if then else condition e.g. [authorized] or [not authorized]. Only one edge is followed based on what condition evaluates to TRUE.
  • 17. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)17 Activity diagram[1] – Avoid multiple guard condition evaluating TRUE • Beware where multiple guard evaluate to TRUE [item in stock] or [item out of stock] and [rush order]
  • 18. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)18 Activity diagram[1] – Merges – better be clear as much as possible: UML 2.0
  • 19. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)19 Activity diagram[1] – multiple task at same time Fork Join Computer assembly shows how “forks” and “joins” work in a complete activity diagram
  • 20. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)20 Activity diagram[1] – time events Representing a recurring event e.g. Update Progress Bar every 1 second. Hour glass – represent Time Event, and text on top of it represents wait time. e.g. Wait for 3 days before Send Bill after Ship Order.
  • 21. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)21 Activity diagram[1] – calling activities or showing object Pitchfork – To represent calling other activity Object node – Use object node to show an activity flowing through an activity. Object interactions, creation, modification or usage.
  • 22. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)22 Activity diagram[1] – showing Actions input and output An Order object is input to Approve Payment action and output from Receive Order Request An input or output pin.
  • 23. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)23 Activity diagram[1] – when an action need only a part of object Here, Approve payment action only need ‘Cost’ object as an input from a ‘Order’ object. Cost object is received using <<transformation>> to specify – Only Cost from Order object.
  • 24. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)24 Activity diagram[1] – showing how object change state during an activity Object ‘Order’ change state during an activity. Object state change from [pending] to [approved]
  • 25. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)25 Activity diagram[1] – showing input and output from an Activity Above, Order object is input and output from Approve Payment activity. Note: When input and output are shown then initial and final node are omitted.
  • 26. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)26 Activity diagram[1] – sending and receiving signals Example: • Sending Credit Card details to card provider. • Collecting response from credit card provider. Based on response ie. approved or denied order status may be shipped or delayed. Receive Response as start node. In this case Initial node may be omitted.
  • 27. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)27 Activity diagram[1] – interrupting an Activity Interrupting event shown with a “Lightning bolt arrow”. Interruption region is shown by a dashed, rounded rectangle around action which can be interrupted. Diagram means – If Receive Cancellation is received while Process Order is active, then interrupt activity and Cancel Order.
  • 28. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)28 Activity diagram[1] – ending a flow Flow Final Node, a flow final node terminates its path only – not the whole activity Note: Be careful when using flow final node after a fork. When a flow final node is reached, then all process are terminated including all processes running before node. If you like to run all forked process to run to completion, make sure to add a join.
  • 29. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)29 Activity diagram[1] – partition or swimlanes
  • 30. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)30 Activity diagram[1] – using annotation
  • 31. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)31 Managing complex Activity Diagrams – connectors [1] Connector – they come in pair Note: If large number of different connectors are used, it can find reader hard time pairing them.
  • 32. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)32 Managing complex Activity Diagrams – expansions [1] Expansion region – large dashed rectangle with four aligned boxes on either side. Usage – expansion regions show that action is performed for each item in an input collection. e.g. Each bug report is discussed, if bug is [real bug] then activity proceeds, otherwise bug is discarded and flow for that input ends.
  • 33. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)33 Advanced Class Diagrams
  • 34. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)34 Advanced Class Diagrams[1] – class relationships
  • 35. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)35 Advanced Class Diagrams[1] – multiple inheritance Note: Though UML supports multiple inheritance, however in practice many don’t. e.g. Java, C#. Reason: such as addEntry(…) is present in both parent classes, so function call need resolution rules. And rules change from language to language.
  • 36. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)36 Advanced Class Diagrams[1] – multiple inheritance url – attribute not NULL Rating – never less than 0 updateRating(…) – precondition {rating>=0} Range specifier – “0 <= rating <= 5”
  • 37. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)37 Advanced Class Diagrams[1] – abstract class Abstract class – does not implement all methods Notation: Methods – written in italics Class name – written in italics
  • 38. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)38 Advanced Class Diagrams[1] – abstract class BlogStore inherits Store, implements abstract methods “ store(…) and retrieve(…)”
  • 39. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)39 Advanced Class Diagrams[1] – interface Interface – does not implement any methods. C++ using abstract classes with no method implementation. Java / C# using special construct “interface”
  • 40. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)40 Advanced Class Diagrams[1] - interface Stereotype notation Ball notation
  • 41. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)41 Advanced Class Diagrams[1] – interface, abstract and concrete
  • 42. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)42 Advanced Class Diagrams[1] - template • “I know the class will have to work with other classes, however at this stage I don’t know what those classes end up being”.  If you find yourself in a similar situation use TEMPLATES  With an extra dashed border on top right corner.  ‘E’ is just a placeholder, can be used later to tell type of objects class will need to store. Notation <<bind>> <E->BlogEntry>
  • 43. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)43 Sequence Diagrams
  • 44. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)44 Sequence Diagrams[1]
  • 45. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)45 Sequence Diagrams[1] • Events – smallest part of an interaction. An event is any point in interaction where something occurs. • Interaction - smallest part in sequence diagram where ‘message/signal’ is sent by one participant to another.
  • 46. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)46 Sequence Diagrams[1] - message
  • 47. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)47 Sequence Diagrams[1] – nested message When a message triggers more than one message at receiving side before return statement to originating participant is made. Definition
  • 48. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)48 Sequence Diagrams[1] – message arrow types “A Return Message is Optional”
  • 49. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)49 Sequence Diagrams[1] – asynchronous message 1. foo() – asynchronous message, without waiting for return you can continue sending other messages.  Implementation – ???? Multithreading feature programming language
  • 50. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)50 Sequence Diagrams[1] – destroy Participant2: ParticipantClass2, is <<created>> and <<destroyed>> during course of sequence diagrams
  • 51. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)51 Sequence Diagrams[1] – from Use Case to Sequence Diagram UseCase to create a regular blog account. [taken from Learning UML 2.0 {by Kim and Russels, Oreilly}]
  • 52. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)52 Sequence Diagrams[1] – from Use Case to Sequence Diagram
  • 53. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)53 Sequence Diagrams[1] – from Use Case to Sequence Diagram Refining - Adding details and internals
  • 54. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)54 Sequence Diagrams[1] – from Use Case to Sequence Diagram More details –  <<destroy>> - :AuthorDetails  Asynchronous – clickSubmit()
  • 55. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)55 Sequence Diagrams[1] – Sequence fragments (new in UML 2.0) Definitions and details next slide
  • 56. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)56 Sequence Diagrams[1] – Sequence fragments (new in UML 2.0) • Why need sequence fragments • Managing complex, huge sequence diagram • Representing loops, alternate flows, interactions with organized and structured sequence diagram. • How to represent • Box that encloses interaction • Nested interaction – one or more box inside a box • Important distinguisher • Operator on top left corner. Operator denotes type of sequence fragment. • Types • opt, ref, assert, loop, break, alt… [ For more details/types refer UML 2.0 in a Nutshell, Oreilly ]
  • 57. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)57 Sequence Diagrams[1] – using a ‘ref’ fragment
  • 58. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)58 Communication Diagrams (a.k.a Collaboration Diagrams in previous UML versions)
  • 59. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)59 Communication Diagrams[1] – Display interaction links Definition – Diagram showing interactions between participant. Also, known as Collaboration Diagram in previous versions. Simpler to represent than Sequence Diagrams. Ingredients – Participants, Links and Messages. CD vis a vis SD – Designer’s personal choice. Sequence diagrams is preferred. True SD is complex, however why compromise when we get more details. [for more details refer table 8.1 Learning UML 2.0, By Kim and Russel, Orielly]
  • 60. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)60 Communication Diagrams[1] – nested messages Message invocation order: 1.messageA()  {1.1messageC()  1.2messageD()}  2.messageB()
  • 61. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)61 Communication Diagrams[1] – parallel messages Message invocation order: 2a.messageB(), 2b.message() and 2c.messageC() all invoked at same time after 1.messageA()
  • 62. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)62 Communication Diagrams[1] – same message multiple times Looping constraints Looping constraint *[i=-0..9] Guard condition [condition - true]
  • 63. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)63 Communication Diagrams[1] – participant calling itself When do we need it  When an object calls its on method. Talking to itself is acceptable in software world otherwise it may sound absurd 
  • 64. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)64 Communication Diagrams[1] – a conversion from SD to CD Our referenced SD: {built from Use Case “Create a Regular blog account”} Click for TD
  • 65. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)65 Communication Diagrams[1] – a conversion from SD to CD Identify participant involved
  • 66. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)66 Communication Diagrams[1] – a conversion from SD to CD Establish link between all necessary participants, refer SD.
  • 67. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)67 Communication Diagrams[1] – a conversion from SD to CD Other steps {disclaimer, each step can be performed separately} – Add messages  Nested messages  Guard conditions  Return messages {for all details keep referring SD},.
  • 68. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)68 Timing Diagrams (new in UML 2.0)
  • 69. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)69 Timing Diagram[1] • Definition • Interaction diagram type, which give detailed timing information. However, Timing diagram are not just about timing information. • Why we need them • When you can model what events to take place, however you want to show when they will take place and how recipient reacts. • Applications • Real time applications, or applications where you want to model / follow strict timing pattern. • Analogy • Similar to logic analyzer for a PCB (printed circuit board).
  • 70. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)70 Timing Diagram[1] – a simple diagram A mail server with logic analyzer; modeled using a timing diagram.
  • 71. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)71 Timing Diagram – exact time or relative time measurements Exact measurement Relative measurement
  • 72. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)72 Timing Diagram[1] – state diagram States – { State1, State2, State3} Participant – “p1”
  • 73. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)73 Timing Diagram[1] – more details
  • 74. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)74 Timing Diagram[1] - events Event – is shown as an arrow from a state (State2) in participant (p1:Participant) to a state (State1) in other participant (p2:Participant2)
  • 75. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)75 Timing Diagram[1] – timing constraints • What timing constraint gives us:- • Tell how long given portion of interaction should take place. • Amount of time a participant remains in a particular state. • How long an event should take to be invoked and received.
  • 76. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)76 Timing Diagram[1] – timing constraints
  • 77. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)77 Timing Diagrams[1] – constraint format specification Timing Constraint (representation) Description {t .. t+5s} Duration of event or state should be 5s or less {<5s} Less formal, however equivalent to {t..t+5s} {>5s, <10s} Duration of event or state should be less than 5s, but less than 10s {t} Duration of event should be ‘t’ secs. It is a relative time, and value of ‘t’ can be anything {t..t*5} Duration of event or state should be t multiplied by 5. This is relative timing. ( ‘t’ can be any value of time)
  • 78. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)78 Timing Diagrams[1] - constraint format specification
  • 79. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)79 Timing Diagrams[1] – arranging participant on TD {a tip} Easy to read, well organized states Untidy, participant misplaced
  • 80. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)80 Timing Diagrams[1] – alternate notation • Timing diagrams represented below, will grow big, unmanageable. • With a increased participant count size of diagram reaches a huge size so soon.
  • 81. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)81 Timing Diagrams[1] – alternate notation • To reduce size of diagram, follow the alternate notation. The alternate Timing Diagram Notation Good when many states to represent.
  • 82. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)82 Timing Diagrams[1] – from SD to TD • SD  Old “Create Blog account SD”. • Click link to view  Referred Sequence Diagram • Technique to generate TD from a given SD  Place the participant correctly • Rotate SD participant 90 degrees counter clockwise {shown in next slide}  Read sequence diagram to determine time of events or states
  • 83. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)83 Timing Diagrams[1] – rotating participants “90º counterclockwise”
  • 84. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)84 Timing Diagrams[1] – read SD, depict state or event time on TD
  • 85. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)85 Interaction Overview Diagrams
  • 86. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)86 Interaction Overview Diagrams[1] • Implements a bigger picture view • IOD = {CD + SD + TD} • IOD – define how different diagrams ie. CD, SD and TD interact to solve • A use case – Or • A particular system concern
  • 87. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)87 Interaction Overview Diagrams
  • 88. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)88 Interaction Overview Diagrams[1] – parts of diagram lifelines subtitles show combined list of participant involved in interactions within overview
  • 89. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)89 Interaction Overview Diagrams[1] – creating IOD for a blog account Legends Create a New Regular Blog Account iod = interaction overview diagram sd = sequence diagram cd = communication diagram td = timing diagram
  • 90. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)90 Interaction Overview Diagrams[1] – creating IOD for a blog account sd = expanded, detailed
  • 91. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)91 Interaction Overview Diagrams[1] – creating IOD for a blog account sd, cd and td = all expanded, detailed
  • 92. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)92 Before we Lets determine where we started from, where we reached and what’s next
  • 93. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)93 We started with • Rev up of UML1.x code samples generated using Rational Rose tool. • UML (Unified Modeling Language) notations, and where was each notation introduced i.e. UML 1.x or UML 2.0 • Who, how, why and what UML 2.0 has been incepted.
  • 94. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)94 We are introduced to • Activity Diagrams • Advanced Class Diagrams • Sequence Diagrams • Communication Diagrams (a.k.a. Collaboration Diagrams) • Timing Diagrams • Interaction Overview Diagrams
  • 95. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)95 What’s next • Composite Structures – modeling class’s internal • Component Diagrams – managing and reusing system’s part • Packages – organizing model • State Machine Diagrams – modeling an object’s state • Deployment Diagrams – modeling deployed system • UML profiles – adapting UML • Object Constraint Language (OCL) – defining constraints • UML 2.0s tools – applying UML 2.0 • And questions ????
  • 96. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)96 What we have to learn to do, we learn by doing. Aristotle++ ++ - http://www.quoteworld.org/quotes/570
  • 97. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)97 UML 2.0 Changes – Part 2
  • 98. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)98 What’s next • Composite Structures – modeling class’s internal • Component Diagrams – managing and reusing system’s part • Packages – organizing model • State Machine Diagrams – modeling an object’s state • Deployment Diagrams – modeling deployed system • UML profiles – adapting UML • Object Constraint Language (OCL) – defining constraints • UML 2.0s tools – applying UML 2.0 {≠ Covered} • And questions ????
  • 99. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)99 Questions from previous session Do an input pin and an output pin exist in pairs?  Not necessarily. See figure 14-214, Page 540-41 from “The Unified Modeling Language Reference Manual” (see references for more details) • Interplay and interchange between diagram?  Could not find much on same. Will try to cover as part of weekly discussion. • State diagram and Timing diagram ?  Will be partly resolved when state diagrams are discussed. However, will also be covered as part of answer to Interplay between diagrams.
  • 100. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)100 Composite Structures (new in UML 2.0)
  • 101. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)101 Composite Structures[1] • Definition • Diagrams apart from, primary UML diagrams such as class and sequence diagrams, to show how objects work inside classes, how objects can achieve the goal. • Why we need them • To reduce gaps which are difficult to fill with class and sequence diagrams. Examples subsequent examples. • Types • Internal Structures, Ports and Collaborations.
  • 102. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)102 Internal Structures[1] • Definition  Diagrams to show parts contained by a class and the relationships between the parts. • Example Details in following slides
  • 103. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)103 Internal Structures[1] - Example  BlogEntry Step 1 – BlogEntry is composed of Introduction and MainBody Step 2 – Improvement, a MainEntry in BlogEntry is associated me with a Introduction Reason: Convenient for other objects to ask an Introduction object the MainBody object it introduces.
  • 104. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)104 Internal Structures[1] - Example  BlogEntry An unintended but a valid object structure. An intended object structure.
  • 105. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)105 Internal Structures[1] - Example  BlogEntry • Argument  Class diagrams are not good at expressing how items contained in a class relate. This is where Internal Structures come handy. • Counter argument  An unintended structure shown previously can be easily avoided while writing the code.  Further, Sequence Diagrams can show object creation and how they are connected. • Then why to read  Internal structures are convenient and simple way to show relationship between contained items, especially when contained items have a complex relationship.
  • 106. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)106 Internal Structures[1] – Conversion Class to Internal Structures
  • 107. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)107 Internal Structures[1] – more details A BlogEntry can contain zero (min) or three (max) pic:Image objects. Connectors represent how parts interact with each other. Alternate notation
  • 108. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)108 Internal Structures[1] – representing associations Association - Dashed outline
  • 109. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)109 Composite Structure - Ports[1] • Definition  A port is a point between a class and the outside world. Distinct way of using a class, usually by different types of clients. • Example • A Wiki class with UserServices and Maintenance capabilities. • Drawn as small rectangle on the boundary of a class.
  • 110. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)110 Composite Structures[1] - Ports • Ports and interfaces  Ports can be used group related interfaces to show services available at that port.
  • 111. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)111 Composite Diagrams[1] – Collaboration Diagrams • Definition • Diagram showing objects by the role they play in a scenario and providing high-level textual description of what objects are doing. [ showing object interaction performing a ] • Any similarities • Object diagram. But collaboration diagram differ in focus.
  • 112. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)112 Composite Structures[1] – Collaboration and Sequence Diagrams Sequence Diagram - ”Implementing Chain Of Responsibility design pattern” Collaboration Diagram – ”Implementing Chain Of Responsibility design pattern”
  • 113. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)113 An alternate notation Participant  placeholder of objects. Connectors  temporary links; mean that the runtime objects communicate during collaboration, but the objects don’t have to communicate outside the collaboration.
  • 114. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)114 An real world example  Object is not bound to a role; it can play different roles in different collaborations.  Objects in a collaboration are not owned by collaboration; they may exist before and after collaboration.  Even though objects communicate in a collaboration; they don’t necessarily communicate outside the collaboration.
  • 115. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)115 Component Diagrams
  • 116. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)116 Component Diagrams[1] • Definition • Encapsulated, reusable and replaceable part of software. • Good candidates • Perform key functionality, and used frequently in software. Examples loggers, XML parsers, shopping cart. • Capacities • Generalize, associate with other classes. Implement interfaces, have operations. • Class vis a vis Component • A component can use classes and other components to perform its task.
  • 117. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)117 Component Diagrams[1] - parts Basic Component Notation An alternate Component Notation
  • 118. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)118 Component Diagrams[1] - parts Provided interfaces – provided services Required interfaces – desired interfaces OR Component Interfaces working together
  • 119. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)119 Component Diagrams[1] – more parts Delegation connector Assembly connector Shows internal parts realize component interfaces Show components working together
  • 120. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)120 Component diagrams – black box or white box
  • 121. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)121 Packages
  • 122. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)122 Packages • Definition  Group of classes are modeled with packages. To organize and avoid name collision among classes. • Examples  Packages in Java, Namespaces in C# • Notation Credentials class is located in security package
  • 123. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)123 Packages – dependencies and visibilities Dependencies Users package imports only Credentials class Visibility “+” – public visibility “-” – private visibility
  • 124. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)124 Packages – managing packages Changes in one can effect other. Tip avoid cycles.
  • 125. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)125 Packages – managing packages Solution – reduce to one package or factor out a new package
  • 126. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)126 State machine diagrams
  • 127. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)127 State Machine Diagrams[1] • Definition  To show how state of an object or system is important factor in its behavior.  Add on to activity and other interaction diagrams. • Applications  Real time system / mission critical systems such as Heart Monitoring System  Dedicated devices whose behavior is defined in terms of state such as ATM.  Gaming application/s.  Network communication protocols.
  • 128. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)128 State Machine Diagrams[1] - essentials Example : State Machine Diagram for a CD player.
  • 129. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)129 State Machine Diagrams – internal behavior and transitions Internal behavior – behavior when object is in this state. Internal transitions – transitions that cause reaction within same state, but doesn’t cause object to change state.
  • 130. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)130 Deployment diagrams
  • 131. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)131 Deployment Diagrams[1] • Definition  Diagrams showing physical view of the system. • Usage  Show how software gets assigned to hardware and how pieces communicate.
  • 132. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)132 Deployment Diagrams[1] – web application
  • 133. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)133 Deployment Diagrams[1] - constituents • Nodes  Hardware or software resource that can host software or related files. • Types  Hardware – server, desktop PC, disk drives  Software – Operating System, J2EE container, web server, application server.
  • 134. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)134 Deployment Diagrams[1] – communication and specification • Communication – how nodes communicate. • Specification – an artifact specifying how another artifact is deployed to a node.
  • 135. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)135 Object Constraint Language (OCL)
  • 136. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)136 Object Constraint Language[1] • Need  Defining constraints in a class diagram, or UML diagrams in general. • Alternate ways  Programming language (C, Java) or natural language • Issues  Natural language ambiguous, Programming language not understood by all • Solution  OMG proposed OCL • Features – formal yet easy to understand language for UML diagrams.
  • 137. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)137 Object Constraint Language[1] - types • OCL has four built in types  Boolean – true; false  Integer - 1, 2, 4534523532, -200  Real – 2.3423432, 11.700000  String – “MDA”
  • 138. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)138 Object Constraint Language[1] -operators Group Operators Supported types Examples Arithmetic +,-,*, / Integer, Real “abc + def / ghi” Additional arithmetic abs(), max(), min() Integer, Real marks.max(scorecard) Comparison <, <=, >, >= Integer, Real abc > = 9 Equality =, <> All title <> ‘Idle’ Boolean and, or, xor, not Boolean isStudent and (nation = “India”) String concat(), size(), substring(), toInteger(), toReal() String title.substring(1,8)
  • 139. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)139 Object Constraint Language[1] - example • Pulling it together
  • 140. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)140 Object Constraint Language[1] – constraint types  Invariant • Must always be true, otherwise system in invalid state. Example : roll_numer always greater than zero.  Pre conditions • Defined on a method, checked before method executes.  Post conditions • Defined on a method, checks values after method executes.
  • 141. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)141 Object Constraint Language[1] – example Sample constraint context BlogEntry :: incrementRating (amount : int) : void pre: amount < = 100 post: rating = rating@pre + amount
  • 142. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)142 Object Constraint Language[1] - automation • OCL constraint from UML model to perform constraint checking • Enhance integration, from UML to runtime model. • Checking errors early, reduce debugging time. • Tool support  ArgoUML, ocl4java, and Dresden OCL Toolkit • OCL tool support will become more mature with advancement in MDA and Executable UML.
  • 143. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)143 UML Profiles
  • 144. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)144 UML Profiles[1] • Definition  Way to adapt UML to a particular platform J2EE, .NET or domain such aerospace, telecom, or healthcare. • Constituent  Made up of stereotypes, tagged values and constraints • Earlier UML versions  UML1.x allowed stereotypes on fly. Cause of confusion to modelers.  UML 2.0 fixed by declaring these stereotypes and tagged values.
  • 145. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)145 UML Profiles [1] – stereotypes and tagged values • Stereotypes – signify element has special use or intent.  Define name of stereotype surrounded by angle bracket or guillemots.  No limit on number of stereotype applied to an element.
  • 146. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)146 UML Profiles[1] – tagged values • Definition – provide extra information to a defined stereotype.  Can apply multiple stereotype to an element, each with its on tagged value.
  • 147. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)147 UML Profiles[1] – constraints • Definition  Constraints impose rules and restrictions on model elements.  Example in subsequent slide.
  • 148. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)148 UML Profiles[1] – creating a UML profile • When  When standard OMG or toolspecific profile is unable to express your model. • How  Extend UML meta-model or meta-class object to define new stereotype.  Enhance stereotype with tagged values.  Define constraints to apply additional rules and constraints.
  • 149. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)149 UML Profiles[1] – creating a UML profile
  • 150. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)150 UML Profiles[1] – why bother • Real power comes when defining a new, or a common vocabulary between domains. • Leverage tools to generate automatic code. • Examples:  Omondo Eclipse Plugin provides J2EE profile  OMG maintains some common profiles such as for CORBA and testing. Testing profile provides mapping to JUnit { commonly used Java unit testing framework}
  • 151. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)151 Wrap up  UML 1.x and UML 2.0 from beginners to intermediate levels.  How to model a system with a simple WikiBlog examples.  Old, or enhanced features in UML 2.0  New diagrams or notations in UML 2.0  Introduction to Object Constraint Language  Introduction to UML profiles
  • 152. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)152 UML – Resource links (Tools and books) • OMG resources link  Tools and tutorials • http://www.uml.org/#Links-General – The current UML specification for free download – Standard UML Profiles and related specifications – Articles about UML – UML Resource Pages – UML Tutorials – And more • Others  Tools • http://en.wikipedia.org/wiki/List_of_UML_tools – List of UML tools maintained on Wikipedia.org  Forum • http://www.uml-forum.com/ – UML forum is a web community on Unified Modeling Language (UML)
  • 153. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)153 References, recommendation and copyrights information
  • 154. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)154 References [1] – Learning UML 2.0; by Kim Hamilton, Russell Miles; Oreilly Publication Recommended reading The Unified Modelling Language Reference Manual, Second Edition, by James Rumbaugh, Ivar Jacobson, Grady Booch; Pearson Education (LPE) UML 2.0 in a Nutshell [Oreilly] Mastering Rational Rose [BPB] UML Toolkit [John Wiley and Sons]
  • 155. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)155 References • Web resources  http://www.omg.org/ • For MDA, UML, OCL and XMI standards and other specifications. • Personal recommendation  UML has extensive support in textbooks, toolkits and on web.  Most authentic and standard is OMG’s official website {www.omg.org}.  It is highly recommended that only standard specification be followed.
  • 156. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)156 Copyrights information • OMG, UML, CORBA – Copyright © 1997-2008 Object Management Group, Inc. All Rights Reserved. • IBM – Copyright IBM Corporation 1994, 2008. All rights reserved. • JAVA, J2EE – Copyright © 1995-2008 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. • C#, .Net – Copyright © Microsoft Corporation, Redmond Washington. All rights reserved. “All attempts have been made to acknowledge Copyrights and avoid infringement of terms, trademarks of organizations. However, if in this material any information / acknowledgement is found missing, please it be considered unintentional. ‘All Rights Reserved’, trademarks, logos still to be considered property of respective organization or standard.”
  • 157. 01-Sept-2008 IT-792 - MDA (UML 2.0 Changes)157 “A spider conducts operations that resemble those of a weaver, and a bee puts to shame many an architect in the construction of her cells. But what distinguishes the worst architect from the best of bees is this, that the architect raises his structure in imagination before he erects it in reality. ” — (Capital, Vol. I, Chap. 7, Pt. 1) Karl Heinrich Marx++ ++ - http://en.wikipedia.org/wiki/Karl_marx