UML Basics


UML Basics
Process Model

Deployment Model

Design Model


UML Basics

Contents  Models
 Use-case model  Design model (Class diagram)

 Diagrams
 Use-case diagram and activity diagram  Sequence diagram and communication diagram  Component diagram and deployment diagram  Topic diagram and browse diagram

 How many diagrams need to be created?

UML Basics

What Is a Model?
 A model is “a complete description of a system from a particular perspective.” A model is a simplification of reality.


UML Basics

Why Model?
 Modeling achieves four aims:
Helps you to visualize a system as you want it to be. Permits you to specify the structure or behavior of a system. Gives you a template that guides you in constructing a system. Documents the decisions you have made.

 You build models of complex systems because you cannot comprehend such a system in its entirety.  You build models to better understand the system you are developing.

UML Basics

Importance of Modeling
Applications approaching like building paper airplanes
Start coding from project requirements Work longer hours and create more code Lacks any planned architecture Doomed to failure

Modeling is a common thread to successful projects
Less Important More Important


UML Basics

Four Principles of Modeling
 The model you choose influences how the problem is attacked.

Process Model

Deployment Model

Design Model

 Every model may be expressed at different levels of precision.

 The best models are connected to reality.  No single model is sufficient.

UML Basics

What Is the UML?
 The UML is a language for
 Visualizing  Specifying  Constructing  Documenting

the artifacts of a software-intensive system.  The Unified Modelling Language (UML) is an industry standard for object oriented design notation, supported by the Object Management Group (OMG).

UML Basics

The UML Is a Language for Visualizing
 Communicating conceptual models to others is prone to error unless everyone involved speaks the same language.  There are things about a software system you can’t understand unless you build models.  An explicit model facilitates communication.


UML Basics

The UML Is a Language for Specifying
 The UML builds models that are precise, unambiguous, and complete.


UML Basics

The UML Is a Language for Constructing
 UML models can be directly connected to a variety of programming languages.
Maps to Java, C++, Visual Basic, and so on Tables in a RDBMS or persistent store in an OODBMS Permits forward engineering Permits reverse engineering


UML Basics

The UML Is a Language for Documenting
 The UML addresses documentation of system architecture, requirements, tests, project planning, and release management.
Use Case Diagram Deployment Diagram
ºÐ»ê ȯ°æÀÇ Çϵå¿þ¾î¹× ³×Æ®¿÷À¸·ÎÀÇ Á¤º¸ ½Ã½ºÅÛ ¿¬°á ¸ðµ¨ - À©µµ¿ì 95 : Ŭ¶óÀ̾ðÆ® - À©µµ¿ì NT: ÀÀ¿ë¼-¹ö - À¯´Ð½º ¸Ó½Å: ÀÀ¿ë ¼-¹ö ¹× µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö - IBM ¸ÞÀÎÇÁ·¹ÀÓ: µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö


Windows95 Windows95

Use Case 1
¹®¼-°ü¸® Ŭ¶óÀ̾ðÆ®.EXE

¹®¼-°ü¸® ¾ÖÇø´

Windows NT

Actor A

Use Case 2

Actor B
Solaris ¹®¼-°ü¸® ¿£Áø.EXE

Alpha UNIX ÀÀ¿ë¼-¹ö.EXE Windows NT

Use Case 3

IBM Mainframe



mainWnd user

fileMgr : FileMgr

document : Document


Document FileMgr

add( ) name : int fetchDoc( ) sortByName( ) delete( ) docid : int numField : int

ƯÁ¤¹®¼-¿¡ ´ëÇÑ º¸±â¸¦ »ç¿ëÀÚ°¡ ¿äûÇÑ´Ù.

1: Doc view request ( )

get( ) open( ) close( ) 2: fetchDoc( ) FileList read( ) sortFileList( ) fList 3: create ( ) create( ) fillDocument( ) add( ) delete( ) 4: create ( ) 1 code.. read() fill the

5: readDoc ( )

È-ÀÏ°ü¸®ÀÚ´Â Àоî¿Â ¹®¼-ÀÇ Á¤º¸¸¦ ÇØ´ç ¹®¼°´Ã¼¿¡ ¼³Á¤À» ¿äûÇÑ´Ù.

6: fillDocument ( )

rep 7: readFile ( ) File Repository

8: fillFile ( ) (from Persistence) read( ) È-¸é °´Ã¼´Â ÀоîµéÀÎ °´Ã¼µé¿¡ ´ëÇØ À̸§º°·Î Á¤·ÄÀ» ½ÃÄÑ È-¸é¿¡ º¸¿©ÁØ´Ù. readDoc( ) readFile( ) read( ) open( ) create( ) fillFile( ) name : char * = 0 GrpFile

9: sortByName ( )

Sequence Diagram

Class Diagram


UML Basics

History of the UML
UML 2.0

UML 1.5
(March, ‘03)

UML 1.1
(Sept. ‘97)

UML 1.0
(Jan. ‘97)

UML 0.9 and UML 0.91
(June ‘96) (Oct. ‘96)

Unified Method 0.8
(OOPSLA ’95)

Public Feedback

Booch ’93

OMT - 2


Other Methods

Booch ‘91

OMT - 1

UML Basics

 Diagrams graphically depict a view of a part of your model.  Different diagrams represent different views of the system that you are developing.  A model element will appear on one or more diagrams.


UML Basics

UML Diagrams in Software Architecture
Use-Case Diagrams Sequence Diagrams Class Diagrams

Structural Diagrams

Composite Structure Diagrams

Communication Diagrams


Component Diagrams

State Machine Diagrams

Behavioral Diagrams

Activity Diagrams

Deployment Diagrams

UML Basics

Key Diagrams in UML

Use Case Diagrams

System Structure

Class Diagrams Collaboration Diagrams
Interaction Diagrams Activity Diagrams State Charts

System Behaviour


UML Basics

Different diagrams of system for different people

Logical View

Implementation View


Software management

Use-Case View
End-user Functionality

Process View

Deployment View
System engineering

System integrators
Performance, scalability, throughput

System topology, delivery, installation, communication


UML Basics

What is a Use-Case Model?
A use-case model:
Is a model of a system’s intended functions and its environment Serves as a contract between the customer and the developers Contains the following diagrams:
 Use case: Shows a set of use cases and actors and their relationships  Activity: Shows the flow of events within a use case  Sequence: Shows how a use case will be implemented in terms of collaborating objects


UML Basics

Use-Case Diagram (Example)
View Report Card

Course Catalog
Register for Courses

Maintain Professor Information

Login Maintain Student Information

Select Courses to Teach Close Registration

Submit Grades

Billing System


UML Basics

Activity Diagram
A step in the flow of events

Flows split based on a guard condition

Beginning of concurrent flows

End of concurrent flow

Show the sequence of activities


UML Basics

Activity Diagram (Example)
Concurrent Threads
Select Course

[ delete course ]


Delete Course

[ add course ]

Synchronization Bar (Fork) Guard Condition
Check Schedule Check Pre-requisites

[ checks completed ]

[ checks failed ]

Synchronization Bar (Join) Transition

Assign to Course Update Schedule

Resolve Conflicts


UML Basics

What is a Design Model?
A design model:
Describes the realization of use cases in terms of design elements Describes the design of the application Contains the following diagrams:
 Class: Shows UML classes and relationships  Component: Shows the structure of elements in the implementation model  Communication and Sequence: Show how objects and classes interact  State Machine: Shows event-driven behavior


UML Basics

Class Diagram (Design Model)
Class diagrams show the static structure of the model, in particular, its classes, their internal structure, and their relationships to other classes. Class diagrams do not show temporal information.
A description of a set of objects

Aggregation Attribute Operation
Class behavior Represents a part-whole relationship

Named property of a class

Shows an inheritance relationship

UML Basics

Sequence Diagram

used to show how objects interact to perform the behavior of all or part of a use case as part of a use-case realization.
Shows the object/class involved in the interaction

Show data exchanged between objects

Execution Occurrence
Shows object executing

Shows the life of the object

UML Basics

Sequence Diagram (Example)
:RegisterForCoursesForm : Student 1: create schedule( ) :RegistrationController SWTSU Catalog : CourseCatalogSystem

: Course Catalog

2: get course offerings( ) 3: get course offerings(for Semester) 4: get course offerings( ) 5: display course offerings( ) 6: display blank schedule( )


Select Offerings


UML Basics

Sequence Diagram: Combined Fragments
Interaction Use (ref)
References another interaction

Optional Fragment (opt)
Executed if guard condition evaluates to true

Loop (loop)
Executed as long as the first guard condition evaluates to true


UML Basics

Communication (Collaboration) Diagram
provide another way to show how objects interact to perform the behavior of a particular use case or a part of a use case. Where sequence diagrams emphasize the interactions of objects over time, communication diagrams are designed to emphasize the relationships between objects. Object/Class
Shows the object/class involved in the interaction

Shows data exchanged between objects


UML Basics

Communication Diagram (Example)
5: display course offerings( ) 6: display blank schedule( )

1: create schedule( ) : RegisterForCoursesForm


: Course Catalog

: Student

2: get course offerings( ) 4: get course offerings( ) 3: get course offerings(forSemester) : RegistrationController : CourseCatalogSystem


UML Basics

Component Diagram
It shows the runtime structure of the system at the level of software components. Components are the modular parts of the system and are made up of groups of related objects that are hidden behind an external interface.

Modular parts of the system

Included to show implementation relationships.

UML Basics

Deployment Diagram
Deployment diagrams show the deployment architecture of the system, that is, which of the system’s software artifacts reside on which pieces of hardware.

Represents a physical file

Owned Element Relationship
Shows another way of showing nested elements

Represents a physical machine


UML Basics

How Many Diagrams Need to be Created?
 Depends:
You use diagrams to visualize the system from different perspectives. No complex system can be understood in its entirety from one perspective. Diagrams are used for communication For example, a class may appear on one or more class diagrams, be represented in a state machine diagram, and have instances appear on a sequence diagram. Each diagram will provide a different perspective.

 Model elements will appear on one or more diagrams.


UML Basics

 Rational Unified Process® course  Essentials of Rational Unified Process®
Essentials of Rational® RequisitePro®
 Web-based or Instructor-led training

Mastering Business Modeling with the UML

 Web sites
Rational’s corporate site: Rational Developer NetworkSM:

 Books and articles about requirements management


UML Basics



Sign up to vote on this title
UsefulNot useful