UML
By Adwait Moghe
CPSC 606 Presentation
Overview
• Introduction
• History
• Goals
• Diagrams and Examples
• Latest Changes
• Disadvantages
• Conclusion
What is UML?
• Unified Modeling Language (UML) is a standard language for
specifying, visualizing, constructing software artifacts.
• Not necessarily restricted to software systems – used in business
modeling.
• Has proven successful in modeling of large and complex systems.
• Uses graphical notations to describe the architecture of software.
• We have used UML in the diagrams for HEASSISTANT.
Goals
• Provide users a expressive, visual language to enable sharing of
meaningful models.
• Enables developers to compare models before implementation
phase.
• Independent of programming language and development process.
• Encourage growth of Object Oriented Tools market.
History
• First modeling languages – 1970’s.
• More than 50 modeling languages present during 1994. Lead to
“method wars”.
• Methods began to incorporate each other’s techniques.
• In 1994, Grady Booch and Jim Rumbaugh (Rational Software
Corporation) unified Booch and Object Modeling Technique
methods to create UML.
• Ivar Jacobson incorporated the OOSE method in 1995, leading to
UML version 0.9 in late 1996.
UML Versions
• UML 1.0 was created through a collaboration of various
organizations: Microsoft, IBM, HP, etc.
• Today, UML is on Version 2.0.
• It is managed by the Object Management Group – not for profit
consortium. UML specification is available for download at
http://www.uml.org/
• Tools that conform the latest 2.0 specification – Rational Software
Architect, Sparx System Architect, StarUML, etc.
Types of UML Diagrams
• Types of UML diagrams (total of 13 – main ones shown below) :
• Use case diagrams
• Class diagrams
• Interaction Diagrams - Sequence and Collaboration
• State Diagrams
• Activity Diagrams
• Implementation Diagrams - Component and Deployment
• We have done some of these for HEASSISTANT.
Use Case Diagrams
Use Case diagrams describe what a system does. HEASSISTANT
simply had 1 actor, but generally, we have multiple actors.
Class Diagrams
Note advanced additional features such as abstract classes,
generalization (inheritance), aggregation (orderdetails make up order)
Sequence Diagrams
Collaboration Diagrams
• Note the use of sequence numbers
• Top level is assigned 1.1 – additional dots
per level away from the user interface.
State Diagrams
Lifetime of a login class.
• Show the state of a particular object throughout the system lifetime.
• Not necessary for all objects – just the critical ones.
• Super states – can be used to nest states to make diagram easier to read.
ACTIVITY DIAGRAMS
• A flowchart of the activity in a system.
• Elegant way to show conditional flows of execution.
• For use in multithreaded environments – can show creation of parallel threads
of execution, stopping of threads of execution.
• Usually one per use case. Objects involved are given their own “swimlanes”.
• Example on next page shows activity flow for "Withdraw money from a bank
account through an ATM.“
• Activities in parallel – debiting account, removing money from slot.
COMPONENT AND DEPLOYMENT DIAGRAMS
High level component communication and dependencies.
Certification
• OMG offers individual certification programs for UML 2.0
with 3 levels – Fundamental, Intermediate, and
Advanced.
• Price per exam is 200 dollars, but Fundamental is
prerequisite to Intermediate.. etc.
• OMG also certifies UML compliant tools from vendors.
• Gives vendors right to place “OMG certified” logos on
products and websites.
UML 2.0 Structure
• Comprised of four parts: superstructure, Infrastructure, Object Constraint
Language, Diagram Interchange
• Superstructure – defines the UML diagrams. Large 710-page PDF free to
download from OMG website.
• Infrastructure - defines the base classes/components used by the
Superstructure.
• Object Constraint Language – formal way of specifying constraints on objects
within a diagram defined in the Superstructure.
• Diagram Interchange – standard for exchange and storage/retrieval of UML
diagrams for different software tools.
State of UML Today
• Size of the UML specification is growing tremendously.
• Changes are being made in the superstructure.
Example – timing diagrams added but weren’t present in
previous versions.
• Extensions to UML being written to handle other
technologies – CORBA, certain Security extensions.
• Requests for Proposal (RFP) are found on OMG
websites.
Significant changes in 2.0
• Activity diagrams completely overhauled – OMG realized
they were being used for business modeling instead of
class modeling. Diagrams were made more similar to
flowcharts.
• Package Diagrams added for high level overview of code
structure.
• Collaboration diagrams renamed as communication
diagrams but specification remains the same.
• Timing diagrams added for real-time applications.
Disadvantages of UML
• Still no specification for modeling of user interfaces.
• Business rule specification – a group exists for this within
the OMG, so we should see something in UML 2.1.
• Poor for distributed systems – no way to formally specify
serialization and object persistence.
• Example – no way to specify that an object resides on a
server process and shared among instances of a running
process.
Disadvantages to UML (continued)
• Requires training/certification when working with
enterprise class systems – wasted resources.
• Management forcing UML on developers.
• Semantics too imprecise – leading to subjective
interpretations while formal testing/verification… Leads
to too many diagram notes.
• Too bloated… contains specifications needed very
rarely.
5 Questions
• What is UML?
• How has UML changed over its versions ?
(currently 2.0)
• Who “manages” UML?
• What is the best tool for creating UML
diagrams?
• Is UML restricted to OOP languages due
to features such as class diagrams?
Questions?
Thank you
References
• http://www.uml.org/
• http://atlas.kennesaw.edu/~dbraun/csis465
0/A&D/UML_tutorial/
• http://bdn.borland.com/article/0,1410,3186
3,00.html
• http://en.wikipedia.org/wiki/Unified_Modeli
ng_Language