26
Copyright © 2013 Curt Hill UML Unified Modeling Language

Copyright © 2013 Curt Hill UML Unified Modeling Language

Embed Size (px)

Citation preview

Page 1: Copyright © 2013 Curt Hill UML Unified Modeling Language

Copyright © 2013 Curt Hill

UMLUnified Modeling Language

Page 2: Copyright © 2013 Curt Hill UML Unified Modeling Language

History• Developed in the 1990s to visually

model object oriented systems– Grady Booch, Ivar Jacobson, Jim

Rumbaugh

• Adopted by Object Management Group (the real OMG) in 1997– They are the maintainers

• ISO standard in 2000• Combines data, business, object and

component modeling• Current version is 2.4

Copyright © 2013 Curt Hill

Page 3: Copyright © 2013 Curt Hill UML Unified Modeling Language

Related Visualizations• Entity Relation Diagrams• Rummler-Brache (swimlane)

diagrams– Derived from flow charts

• Gane-Sarson (data flow diagrams)• The Unified of UML shows that these

were incorporated or modified

Copyright © 2013 Curt Hill

Page 4: Copyright © 2013 Curt Hill UML Unified Modeling Language

OMG SpecificationThe Unified Modeling Language (UML) is a graphical language for visualizing, specifying, constructing, and documenting the artifacts of a software-intensive system. The UML offers a standard way to write a system's blueprints, including conceptual things such as business processes and system functions as well as concrete things such as programming language statements, database schemas, and reusable software components

Copyright © 2013 Curt Hill

Page 5: Copyright © 2013 Curt Hill UML Unified Modeling Language

What is UML• It is a graphics language

– More of a specification of a language

• Use to define a system• Describe the components of that

system• Blueprint for the system• Does not define methodology, but

supports any methodology• Defines syntax and semantics for a

variety of domainsCopyright © 2013 Curt Hill

Page 6: Copyright © 2013 Curt Hill UML Unified Modeling Language

Domains• Six major domains• Use case model

– The interaction between a user and the system

• Communication model– How components within the system

interact

• Dynamic model– The states the system will pass through

in order to accomplish work

Copyright © 2013 Curt Hill

Page 7: Copyright © 2013 Curt Hill UML Unified Modeling Language

More domains• Logical model

– System’s classes and objects

• Component model– The system’s software – Hardware used if unusual

• Physical Deployment model– Hardware architecture– How applications are deployed on this

hardware

Copyright © 2013 Curt Hill

Page 8: Copyright © 2013 Curt Hill UML Unified Modeling Language

Diagrams• Classify UML diagrams into two basic

types• Behavioral

– Describes dynamic interactions

• Structural– Describes static architecture

• Interaction

Copyright © 2013 Curt Hill

Page 9: Copyright © 2013 Curt Hill UML Unified Modeling Language

Reference Chart

Copyright © 2013 Curt Hill

Page 10: Copyright © 2013 Curt Hill UML Unified Modeling Language

Use Case Diagram• Diagrams an interaction between a

user and the system• A scenario is a single interaction

between a user and the system– Usually a text description of what will

happen

• The use case diagram will often have many scenarios

Copyright © 2013 Curt Hill

Page 11: Copyright © 2013 Curt Hill UML Unified Modeling Language

Contents• People, internal or external, are

depicted as stick figures• Ovals represent the use case• Lines connect the various actors

Copyright © 2013 Curt Hill

Page 12: Copyright © 2013 Curt Hill UML Unified Modeling Language

Example Pharmacy

Copyright © 2013 Curt Hill

Page 13: Copyright © 2013 Curt Hill UML Unified Modeling Language

State Chart Diagram• An interaction with a component• Has one start and one or more finish

nodes• Each box represents a state• Each arrow a state transition

Copyright © 2013 Curt Hill

Page 14: Copyright © 2013 Curt Hill UML Unified Modeling Language

Example Windows Login• Has one start and one end state• Two middle states

– Entering login– Entering password

• The Enter or Tab changes state• All other characters return to same

state

Copyright © 2013 Curt Hill

Page 15: Copyright © 2013 Curt Hill UML Unified Modeling Language

Example Windows Login

Copyright © 2013 Curt Hill

Page 16: Copyright © 2013 Curt Hill UML Unified Modeling Language

Activity Diagram• Modified flowchart• Flow of activities between various

items• Each item has a column

– Known as a swimlane

• The activity moves between the lanes as the pieces interact

• Shows dependence of the actions of these items

Copyright © 2013 Curt Hill

Page 17: Copyright © 2013 Curt Hill UML Unified Modeling Language

Activity Diagrams• Ovals or rectangles represent actions• Diamond are decisions with multiple

possible output actions or merges with multiple inputs

• Arrows are the flow• Actions may fork, that is split into

concurrent actions, or join concurrent actions

Copyright © 2013 Curt Hill

Page 18: Copyright © 2013 Curt Hill UML Unified Modeling Language

Example: Buying Car

Copyright © 2013 Curt Hill

Page 19: Copyright © 2013 Curt Hill UML Unified Modeling Language

Diagrams

• UML is not generally precise• It is not usually compiled into code

– Although may be in some cases

• Different places might have different conventions on the symbols used

• Diagrams may be generated with Microsoft Visio or many other applications

Copyright © 2013 Curt Hill

Page 20: Copyright © 2013 Curt Hill UML Unified Modeling Language

Other Tools• A number of software tools for UML may

also be used that have more power• Most of these favor one methodology or

another• Some features

– Code generation from diagrams– Generate diagrams from code– Round trip engineering– Report generation– Collaboration on diagrams

Copyright © 2013 Curt Hill

Page 21: Copyright © 2013 Curt Hill UML Unified Modeling Language

Usage• The objects description is the heart

of UML• There are three views of how it

should be used:• Sketch• Blueprint• Language

Copyright © 2013 Curt Hill

Page 22: Copyright © 2013 Curt Hill UML Unified Modeling Language

Sketch• Least formal• In sketch mode the objects are

discussed in an informal session among the developers

• Often starts on a whiteboard• When the design starts to finalize it

makes it to paper• Any good graphics program can make

it:– Visio, paint or many others

Copyright © 2013 Curt Hill

Page 23: Copyright © 2013 Curt Hill UML Unified Modeling Language

Blueprint• A blueprint is an exact guide used for

construction• An experienced developer generates

detailed blueprints• A team of (less experienced)

developers convert this to programming language

• This requires a specialized tool since this is a precise description

Copyright © 2013 Curt Hill

Page 24: Copyright © 2013 Curt Hill UML Unified Modeling Language

Directions• In both sketch and blueprint mode

there are two directions one can go:– UML to Code– Code to UML

• The latter usually is done by a program that scans the code and generates the graphics

Copyright © 2013 Curt Hill

Page 25: Copyright © 2013 Curt Hill UML Unified Modeling Language

Language• If the generation of the UML is

precise enough and the tools sufficient, then the diagrams may be compiled directly into machine language

• This requires well experienced developers and a very good (expensive) tool

• Only one direction in this case, the UML is the code

Copyright © 2013 Curt Hill

Page 26: Copyright © 2013 Curt Hill UML Unified Modeling Language

Conclusion?• Devised for software system design• Has incorporated many different

graph and diagram types• Also used in Entrerprise Architecture

to model the enterprise• An exercise should follow• You should install Visio, if it is not on

your computer

Copyright © 2013 Curt Hill