unified modeling (part i) overview of uml & modeling

27
Unified Modeling (Part I) Overview of UML & Modeling Elizabeth Bigelow Carnegie Mellon University

Upload: wells

Post on 22-Feb-2016

102 views

Category:

Documents


0 download

DESCRIPTION

Unified Modeling (Part I) Overview of UML & Modeling. Elizabeth Bigelow Carnegie Mellon University. Today’s Lecture. Modeling Software Architecture Introducing UML Software Development Life Cycle. Modeling. Why model? Kinds of models Why is it important? Principles of Modeling - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Unified Modeling (Part I) Overview of UML & Modeling

Unified Modeling (Part I)Overview of UML &

Modeling

Elizabeth BigelowCarnegie Mellon University

Page 2: Unified Modeling (Part I) Overview of UML & Modeling

Today’s LectureModelingSoftware ArchitectureIntroducing UMLSoftware Development Life Cycle

Page 3: Unified Modeling (Part I) Overview of UML & Modeling

ModelingWhy model?Kinds of modelsWhy is it important?Principles of ModelingObject-Oriented Modeling

Page 4: Unified Modeling (Part I) Overview of UML & Modeling

Why Model?To communicate the desired structure and behavior of a system

To visualize and control the architecture

To better understand a system and manage risk

To reason about alternatives

Page 5: Unified Modeling (Part I) Overview of UML & Modeling

Kinds of ModelsIconic (example: model airplane)

Analogic (example: electrical network modeling the flow of liquid through pipes; some properties, some structure)

Analytic (example: set of differential equations claiming to describe how prices change)

Page 6: Unified Modeling (Part I) Overview of UML & Modeling

What is a model?A simplification of reality (abstraction)-- not the truth, the whole truth and nothing but the truth…

At the same time, we choose to make certain parts rigorous

Page 7: Unified Modeling (Part I) Overview of UML & Modeling

Why is Modeling Important?

We cannot visualize a system in its entirety--limits to the human ability to understand complexity

Page 8: Unified Modeling (Part I) Overview of UML & Modeling

Principles of ModelingChoice of model has profound influence on how a problem is attacked and how solution is shaped

Every model may be expressed at different levels of precision

The best models are connected to reality

No single model is sufficient

Page 9: Unified Modeling (Part I) Overview of UML & Modeling

The hard partMany models of the same thing are nearly independent (at least in preparation)

The hard part: fitting them all together

Page 10: Unified Modeling (Part I) Overview of UML & Modeling

Object Oriented ModelingThe primary strength of object oriented modeling is helping to pull the various models together

Traditional methods algorithmically based--tend to be brittle, hard to change

Does not mean that implementation must be object oriented, or even in an object oriented language

Page 11: Unified Modeling (Part I) Overview of UML & Modeling

Software ArchitectureShaw & Garlan:

Software Architecture is the system level organization of components (units of code) and connectors (method invocation, RPC,network protocols, etc.)

Another definition is that software architecture is the highest level of system organization in which one can discern or impose order.

Page 12: Unified Modeling (Part I) Overview of UML & Modeling

Architectural Decisions Organization of a software system Selection of structural elements and their

interfaces by which the system is composed Behavior (collaboration among elements) Composition into progressively larger

subsystems Architectural style (patterns, pipe-filter,

functional decomposition, object-oriented, main line procedure call, event system)

Page 13: Unified Modeling (Part I) Overview of UML & Modeling

Design View

Process View

ImplementationView

DeploymentView

Use CaseView

Modeling a System’s Architecture

Page 14: Unified Modeling (Part I) Overview of UML & Modeling

Design View Classes, interfaces collaborations Services that should be provided to

end users Static aspects captured in class

diagrams and object diagrams Dynamic aspects are captured in

interaction diagrams, statecharts, and activity diagrams

Page 15: Unified Modeling (Part I) Overview of UML & Modeling

Process ViewThreads and processes that form a system’s concurrency and synchronization mechanisms

Addresses performance, scalability and throughput of the system (focus on active classes)

Page 16: Unified Modeling (Part I) Overview of UML & Modeling

Implementation ViewComponents and files used to assemble and realize the physical system

Diagrams: component diagrams (static) and interaction diagrams, statechart diagrams and activity diagrams

Page 17: Unified Modeling (Part I) Overview of UML & Modeling

Deployment ViewHardware topology on which the system executes

Distribution, deliver and installation of the parts that make up the physical system

Deployment diagrams (static) and interaction, statechart, and activity diagrams (dynamic)

Page 18: Unified Modeling (Part I) Overview of UML & Modeling

Use Case ViewUse cases describe the system as seen by its end users, analysts and testers

Static aspects are captured in use case diagrams and dynamic are captured in interaction diagrams, statechart diagrams and activity diagrams

Page 19: Unified Modeling (Part I) Overview of UML & Modeling

UML Conceptual Model Building blocks--things, relationships

and diagrams Rules on how the blocks may be put

together (names, scope, visibility, integrity, execution)

Common mechanisms (specifications, adornments, common divisions, extensibility mechanisms)

Page 20: Unified Modeling (Part I) Overview of UML & Modeling

Classes and ObjectsA class is a set of objects that share the same attributes, relationships and semantics.

An object is an instance of a class--an entity with a well defined boundary and identity that encapsulates state and behavior

Page 21: Unified Modeling (Part I) Overview of UML & Modeling

Key Abstractions

Structural Things (class, interface) Behavioral Things (dynamic,

interaction-messages, state machines) Grouping Things (packages) Annotational Things (comments,

constraints) Relationships (dependency,

association, generalization, realization

Page 22: Unified Modeling (Part I) Overview of UML & Modeling

DiagramsClass diagramsObject diagramUse case diagramSequence diagramCollaboration diagramStatechart diagramActivity diagramComponent diagramDeployment diagram

Page 23: Unified Modeling (Part I) Overview of UML & Modeling

ExamplesWright Flyer

1 *

Wing Canard Rudder Engine2 2

NameWeight

Pilot

Increase Throttle()Brake ()Decrease Throttle()

Take Off ()Land ()Turn()

1 1 11

Flies

Page 24: Unified Modeling (Part I) Overview of UML & Modeling

Idle (Parked)

TakingOff Flying

Landing

High Level Statechart for Wright Flyer

Page 25: Unified Modeling (Part I) Overview of UML & Modeling

Orville

<<extends>>

Wright FlyerWilbur

StartsEngine

Flexes Wing

ReleasesCatapult

Says Start Engine

USE CASE DIAGRAM

Page 26: Unified Modeling (Part I) Overview of UML & Modeling

The Lifecycle According to Booch, Rumbaugh and Jacobson

Inception Business Modeling & RequirementsElaboration Analysis, Design, Implementation, TestConstruction Analysis, Design, Implementation, TestTransition Implementation, Test, Deployment

Page 27: Unified Modeling (Part I) Overview of UML & Modeling

Next Time

Basic Structural Modeling