Date post: | 06-May-2015 |
Category: |
Technology |
Upload: | terry-cho |
View: | 8,732 times |
Download: | 1 times |
Introducing Unified Modeling Language
2003-02-26 Byungwook Cho
Table of contents
1)What is UML?2)Elements of UML3)Use case diagram4)Activity diagram5)Class diagram6)Sequence diagram7)Collaboration diagram8)Component diagram9)Deployment diagram
Key point-Kind of UML diagram-Role of each UML diagram-Trace UML diagram
1. What is UML ?
• Unified Modeling Language• Just Notation• Goal
– To model system using object-oriented concepts.
– To visualize software structure– To create modeling language useable by both
humans and machines• History
– 1994. Grady Booch (Booch Method), James Rumbaugh (OMT-2)
– 1995. Ivar Jacobson (OOSE and the Objectory)– Rational Software (IBM.2002)
2. Elements of UML
• Elements of UML– Things – Relationships– Diagram
• Interaction model of things
2. Elements of UML
1) Elements - Things– Structural things
• Static things• Class,Use case,Component,Nodes.
– Behavioral things• Dynamic things.• Message,States.
– Grouping things• Aggregate elements of UML• Package
– Annotational things• Like comment.• Note
2. Elements of UML
2) Elements - Relationship – Dependency– Association (method call etc.)– Generalization– Realization ( 특정 Things 를 구체화하여
표현하는 관계 )
2. Elements of UML
3) Elements – Diagrams– Use case diagram– Activity diagram– Class diagram– Sequence diagram– Collaboration diagram– Component diagram– Deployment diagram
UML Diagrams
Use case Diagram
Use case Diagram
Class Diagram
Class Diagram
SequenceDiagram
SequenceDiagram
CollaborationDiagram
CollaborationDiagram
Activity Diagram
Activity Diagram
ComponentDiagram
ComponentDiagram
DeploymentDiagram
DeploymentDiagram
Static
Dynamic
Analyze system domain(Use Case View)
Relationship between class,object(Logical view)
System structure and arrangement(Physical view or Implementation view)
Development process
3. Use case diagram
• Use case Diagram– Define interaction between system and
external environment ※ external environment user,external system etc.
– Visualize system function and elements.– Frequently used in analysis phase.– Main factor in RUP
• Consists of– Actor,Use case,Association → Diagram– Use case description
Very Important!!
3. Use case Diagram
• Use case diagram ※ Think point : use case scope.
Buy Drink
Add Ice
<<extend>>
Insert Coin<<include>>
Buyer
Bending Machine
3. Use case Diagram• Use case
description– Define use case do
“What”, not “How”.
– Include• Start condition.• Functional flow of
use case.• Interaction within
actor and use case.• Data,selection,exc
eption flow.
▷ Use case: Use case name ▷ Actor: Actor name that uses this use case ▷ Cross Reference : Requirement # in client
requirement list ▷ Purpose: mission objective of this use case ▷ Overview: over view of this use case ▷ Type: Primary,Secondary, or Optional ▷ Main Flow
▷ Detailed Flow ▷ Alternative Flow ▷ Exception
▷ Use case: Use case name ▷ Actor: Actor name that uses this use case ▷ Cross Reference : Requirement # in client
requirement list ▷ Purpose: mission objective of this use case ▷ Overview: over view of this use case ▷ Type: Primary,Secondary, or Optional ▷ Main Flow
▷ Detailed Flow ▷ Alternative Flow ▷ Exception
○ Actor Action1. …2. …
4. …
○ System Response
3. …시작조건<Actor> <Event>
4. Activity / State Diagram
• Activity / State Diagram– Modeling dynamic behavior of system.– Can be used in modeling use case life
cycle,system life cycle and object life cycle etc.
– Modeling object state transition (by event).• Consists of
– Activity,Transition,Decision,Synchronization bars,State,Swim Lane
※ Activity Diagram – Business Process,Operation Algorithm.※ State Diagram – Pre/Post condition of component.
4. Activity / State Diagram
Working
Check System Clock
Input user action
Display user action to screen
action
Wait for user action
Refresh time
[Time check]
Run screen saver
H
[Time over]
Press key or move mouse
History State
Sub state
Sub state
State transition
5. Class Diagram• Class diagram
– A common techniques to modeling object oriented system.
– Modeling interaction within class/interface.– Modeling in static view.
• Consists of– Package,Class,Interface,Association.– Class stereo type (Entity,Boundary,Control : MVC)
• Phase of class diagram– Conceptual model (Not for software design, just for
analysis)– Logical model (None system dependent software
structure,MVC)– Implementation model (+ Architecture,System
dependent)
5. Class DiagramPerson
Company
n
1..n
works for
+Employer
+Employee
n
1..n
Class Person{ Company employer = null; :}// Class Person
Class Company{ :}// Class Company
Multiplicity
Association Name
Role Name
6. Sequence Diagram
• Sequence diagram– Dynamic diagram that describe interaction between object.– Focus on time sequence.– Define message between object– Frequently be used in describing use case scenario.– Can describe sequence,selection,iteration.※ can be used in extract class method in logical class model.
• Consists of– Actor,Object,Message– object life cycle line,operation running time
6. Sequence Diagram
• Example)– 1. GUI notify key stroke to OS– 2. Os notify key stroke to CPU– 3. OS update UI.– 4. CPU request updating screen to video card.– 5. Video Card send update screen to monitor.– 6. Monitor display some character and feed back to use
:GUI :OS :CPU :Video Card :Monitor
User
Keystroke
feedback
1.notify2.notify
3.updateRequest
4. updateScreen
Object Life cycle
Operation running time
6. Sequence Diagram
:GUI :Os :CPU :Video Card :Monitor
User
Keystroke
feedback
Init
Process
Exit
※ Sequence diagram with object state
7. Collaboration Diagram
• Collaboration Diagram– Dynamic diagram that describe interaction between object. – Focus on collaboration structure and organization
between object.– Modeling link within object. (can extract to association in class
diagram)
– Same as sequence diagram※ Frequently used to define class method in “Implementation Class
Diagram”
• Consists of– Object,Link,Message,Data Token
7. Collaboration Diagram
:GUI[Process] :OS
:CPU
:Video Card
:Monitor
User
Key stroke 1: notify(Key stroke)
4: notify(Key)
3: update(key stroke)
5: display(Key)
6: feedback()
:GUI[Init]
<<become>>
State
State transition
8. Component Diagram
• Component diagram– Define dependency between physical
element of software and other elements (class etc.)
– Realize class in class diagram
• Consists of– Package,Dependency,Interface,Component– Component
• Source component• Binary component (*.dll,*.class,beans)• Executable component (*.exe,server)
8. Component Diagram
home.java
<<file>>
AnimationLogo.java
<<file>>
Animator.java
<<file>>
AnimationLogo.doc
<<document>>
Animator.doc<<document>>
umlViewer.class<<Application>>
dbhandler.exe<<Application>>
9. Deployment Diagram
• Deployment Diagram– Define ‘hardware deploy structure’ of
each software element.
• Consists of– Device,Process,Connection
9. Deployment Diagram
Server
Client
ServerProgram.class
ClientProgram.class
DatabaseServer
Oracle8i
JDBC OCI Driver
TCP/IP
Sun E2000
WINX PC
Device
Use case DiagramUse case Diagram
Activity/State DiagramActivity/State Diagram
Class DiagramClass Diagram
Conceptual ModelConceptual Model
Logical ModelLogical Model
Implementation ModelImplementation Model
Sequence DiagramSequence Diagram
Collaboration DiagramCollaboration Diagram
scenario
class,attribute
method
UI DesignUI DesignArchitectureArchitecture
DB DesignDB Design
PatternPattern
Deployment DiagramDeployment Diagram
Component DiagramComponent Diagram
ongoing
Analyze system domain(Use Case View)
Relationship between class,object(Logical view)
System structure and arrangement(Implementation Diagram)
Static
Dynamic
※ UML diagram tracing relationship.
Use case DiagramUse case Diagram
use case realization
realization
deploy structure
Object Oriented Software Development Process
• RUP,XP,OSP,SSADM,Information Engineering Methodolgy• Key factor
– Incremental– Iterative– Device and conquer
Books
• UML– UML distilled – Beginning java object / Wrox– UML toolkit– Building web application with UML / Addison Wesley
• OSP– Applying UML and patterns 2nd Ed– Larman / Prentice Hall
• XP– Extreme programming installed / Addison Wesley
• RUP– Visual modeling with rational rose 2000 and uml / Addison
Wesley– The rational unified process an introduction / Addison Wesley