01 concepts of_object-orientation (1)

18
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 01. Concepts of Object-Orientation

Upload: aadi-ra

Post on 18-Jul-2015

25 views

Category:

Engineering


3 download

TRANSCRIPT

Page 1: 01 concepts of_object-orientation (1)

®

IBM Software Group

© 2006 IBM Corporation

Rational Software France

Object-Oriented Analysis and Design with UML2 and Rational Software Modeler

01. Concepts of Object-Orientation

Page 2: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Where Are We?

What is Modeling?

Principles of Object-Orientation

The Unified Modeling Language

Page 3: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What is a Model?

A model is a simplification of reality

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

Page 4: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Principles of Visual Modeling

The model you create influences how the problem is attacked

Every model may be expressed at different levels of precision

The best models are connected to reality

No single model is sufficient

Page 5: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Model-Driven Development

A natural evolution of object-oriented technologies

The encapsulation of business logic in (UML) models

The use of these models to automate the development of applications, code generation, testing and maintenance

? ?

Page 6: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Model-Driven Architecture (MDA)

An architectural style

An OMG initiative

Transformation RulesTransformation Rules

PSM PSMPSMPlat form Specif ic

Model –Design/

I mplementat ionPSM PSMPSM

Plat form Specif ic Model –Design/

I mplementat ion

Auto

mat

ed G

ener

atio

nAu

tom

ated

Gen

erat

ion

Transformation RulesTransformation Rules

Plat form I ndependent

Model –Analysis/ Design

PIM PIMPlat form

I ndependent Model –

Analysis/ DesignPIM PIM

Comput at ion I ndependent Model –

Domain Model, Business Model,

Requirement s, et c.

CIM

Comput at ion I ndependent Model –

Domain Model, Business Model,

Requirement s, et c.

CIM

Code, Files, ArtifactsTransformation Rules

Code, Files, ArtifactsTransformation Rules

Code, Files, ArtifactsTransformation Rules

http://www.omg.com/

Page 7: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Where Are We?

What is Modeling?

Principles of Object-Orientation

The Unified Modeling Language

Page 8: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Basic Principles of Object Orientation

Abstraction

Encapsulation

Modularity

Hierarchy

Page 9: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What Is Abstraction?

The essential characteristics of an entity that distinguishes it from all other kinds of entities

Depends on the perspective of the viewer

Is not a concrete manifestation, denotes the ideal essence of something

From Object-Oriented Analysis and Design with Applications by Grady Booch, 1994

Page 10: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What Is Encapsulation?

Hides implementation from clientsClients depend on

interface

Improves the resiliency of the system, i.e. its ability to adapt to change

From Object-Oriented Analysis and Design with Applications by Grady Booch , 1994

Page 11: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What Is Modularity?

Breaks up something complex into manageable pieces.

Helps people understand complex systems

From Object-Oriented Analysis and Design with Applications by Grady Booch , 1994

Page 12: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What Is Hierarchy?

Decreasing abstraction

Increasingabstraction

Asset

RealEstate

Savings

BankAccount

Checking Stock

Security

Bond

Elements at the same level of the hierarchy should be at the same level of abstraction

Page 13: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Where Are We?

What is Modeling?

Principles of Object-Orientation

The Unified Modeling Language

Page 14: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

What Is the UML?

The UML is a language for Visualizing

Specifying

Constructing

Documenting

the artifacts of a software-intensive system

Page 15: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

UML Covers All Aspects of Software Development

The UML addresses system architecture, requirements, tests, project planning, and release management

Use Case Diagram

Actor A

Use Case 1

Use Case 2

Use Case 3

Actor B

Class Diagram

GrpFile

read( )

open( )

create( )

fil lFile( )

rep

Repository

name : char * = 0

readDoc( )

readFile( )

(from Persistence)

FileMgr

fetchDoc( )

sortByName( )

DocumentList

add( )

delete( )

Document

name : int

docid : int

numField : int

get( )

open( )

close( )

read( )

sortFileList( )

create( )

fil lDocument( )

fList

1

FileList

add( )

delete( )

1

File

read( )

read() fil l the

code..

Sequence Diagram

user

mainWnd fileMgr :

FileMgr

repositorydocument :

Document

gFile

1: Doc view request ( )

2: fetchDoc( )

3: create ( )

4: create ( )

5: readDoc ( )

6: fi llDocument ( )

7: readFile ( )

8: fillFile ( )

9: sortByName ( )

ƯÁ¤¹®¼-¿¡ ´ëÇÑ º̧ ±â¸¦

»ç¿ëÀÚ°¡ ¿äûÇÑ´Ù.

È-ÀÏ°ü¸®ÀÚ´Â Àоî¿Â

¹®¼-ÀÇ Á¤º¸¸¦ ÇØ´ç ¹®¼-

°́ ü¿¡ ¼³Á¤À» ¿äûÇÑ´Ù.

È-¸é °´Ã¼´Â ÀоîµéÀÎ

°´Ã¼µé¿¡ ́ ëÇØ ÀÌ̧ §º°·Î

Á¤·ÄÀ» ½ÃÄÑ È-¸é¿¡

º¸¿©ÁØ´Ù.

Deployment Diagram

Window95

¹®¼-°ü¸®

Ŭ¶óÀ̾ðÆ®.EXE

Windows

NT

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

Windows

NT

Windows95

Solaris

ÀÀ¿ë¼-¹ö.EXE

Alpha

UNIX

IBM

Mainframe

µ¥ÀÌŸº£À̽º¼-¹ö

Windows95

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

ºÐ»ê ȯ°æÀÇ Çϵå¿þ¾î¹× ³×Æ®¿÷À¸·ÎÀÇ Á¤º¸ ½Ã½ºÅÛ ¿¬°á ̧ ðµ¨

- À©µµ¿ì 95 : Ŭ¶óÀ̾ðÆ®

- À©µµ¿ì NT: ÀÀ¿ë¼-¹ö

- À ´̄нº ̧ Ó½Å: ÀÀ¿ë ¼-¹ö ¹× µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö

- IBM ¸ÞÀÎÇÁ·¹ÀÓ: µ¥ÀÌŸ ¼-¹ö, Åë½Å ¼-¹ö

Page 16: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

History of the UML

UML 1.0(Jan. ‘97)

UML 1.1(Sept. ‘97)

UML 1.5(March, ‘03)

UML 2.0(2004)

Other Methods Booch ‘91 OMT - 1OOSE

Booch ’93 OMT - 2

Unified Method 0.8(OOPSLA ’95)

UML 0.9(June ‘96)

UML 0.91(Oct. ‘96)

and

Current version = 2.1

Page 17: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

A Language Is Not Enough to Build a System

Modeling Language

Unified Process

Team-Based Development

Page 18: 01 concepts of_object-orientation (1)

IBM Software Group | Rational software

Review

Why do we model?

True or false: A model influences how the problem is attacked.

True or false: A single model is sufficient in most cases.

How do MDD and MDA differ?

What are the four basic principles of object-orientation?

True or false: UML is a method to capture the requirements of the system to be and build a robust design.