Presentation - METU Computer Engineering - Middle East Technical ...

34 downloads 169 Views 149KB Size Report
UML. – Use Case Diagrams. – Class Diagrams. – Sequence Diagrams ... Abbreviation for Unified Modeling Language .... Hospital Management Automation.
Component Oriented Software Development A new Approach and a Case Study

Ali H. Doğru Middle East Technical University

Contents • • • • •

Component Orientation COSEML and UML A Case Study Evaluation and Metrics Conclusions

Introduction • Unified Modeling Language: UML (OO) • Component-Oriented Software Engineering Modeling Language: COSEML (CO) • A case study including 20 student projects • 3 group of metrics to evaluate process and product

COSEML • Supports Component Oriented Development • Primary view is the structural decomposition • Representation of abstractions as well as implementation-level components • Static (composition) and dynamic modeling (message) links • Decomposition view supported with UML syntax • Yet experimental

UML • Abbreviation for Unified Modeling Language • Object Oriented Modeling, heavily based on classes, inheritance, and messages • Defines 9 types of diagrams to represent various modeling viewpoints: – – – –

Use Case Diagrams Class Diagrams Sequence Diagrams Collaboration Diagrams

– – – – –

Object Diagrams Activity Diagrams Statechart Diagrams Component Diagrams Deployment Diagrams

Component-Based versus Component-Oriented • The system that are not fully object-oriented but that consist of objects are called objectbased. • Similarly, systems that are not fully component-oriented but consist of components are called component-based.

1

Objects Compared to Components class 1

class 2

properties

properties

methods

methods

Data

Object Oriented interface 1

interface 2

interface 3

properties

properties

properties

properties

methods

methods

methods

methods

events

events

events

class 3

inherits

Modeling Emphasis for Different Approaches

Component Oriented Structure

class 4 properties

instance of object

Traditional

has

methods

component 1

Function

component 2 component 3

A New Paradigm • Build by Integration vs. code writing • Issues • Locating the components • Integration • Hard Engineering disciplines discovered earlier

Graphical Symbols in COSEML Package

Function

Data

Connector Connector

Control

Component interface1 interface2 . .

interface

Component properties

properties

methods

methods

events in

events in

events out

events out

Abstractions Components

with single interface

COSE Symbols and Their Meanings

COSE Symbols and Their Meanings (contd.)

Package

Interface

Function

Represents

Data

Event link

Control

Method link

Connector

UML …

Component

2

Abstract Modeling of a Small Business in COSE

Corresponding Abstractions to Components in COSE

My Business Personnel

Personnel

Inventory

Sale

Inventory

Sale

Clients

Accounting

Clients

E Sale

Store Sale

Manual operations

Inventory table

Sale deduction

Store Sale

Accounting

E Sale inventory

sale

manual

shopping cart

inventory inventory

Sale list

Sell

Deduct

Deduct

Sell

sale

Shopping cart

GUI

M y B u s in e s s

Detailed Modeling Through Components in COSE inventory

sale

manual

P erso n nel

shopping cart

In v en tory

inventory

S a le

M anual o p e r a t io n s

In v en to ry t a b le

inventory

sale

GUI

A c c o u n t in g

C lie n t s

S t o r e - S a le

E -S a le

S a le

GUI

d e d u c t io n

m anual

GUI

I n v . ta b le

S a le lis t

D ed u ct

S h o p p in g ca rt

D ed u ct

m o d if y

manual

sale

Inv. table

inv.tabl

modify

deduce

reports

lock req lock grant

inventory sale list add buy cancel

GUI Sale list Add

lock ack

Buy

lock req

Cancel

inventory sale list add buy cancel

S e ll

S e ll

rep o rts

in v e n t o r y

GUI

s a le

m anual s a le

Sale list

s h o p p in g cart in v e n t o r y

in v e n t o r y GUI

GUI

Add

lock ack

Buy

lock req

Cancel

s a le in v . t a b le d ed u ce lo c k r e q lo c k g r a n t

A Case Study • 20 projects • UML and COSEML designs for each project • Groups of 1-2 senior undergraduate students • Students having a little O-O background and no UML or COSEML experience • Two metrics forms

in v e n t o r y s a le lis t add buy ca n cel lo c k a c k lo c k r e q

G UI S a le lis t A dd B uy C a n cel

in v e n t o r y s a le lis t add buy ca n cel lo c k a c k lo c k r e q

G UI S a le lis t A dd B uy C a n cel

Project Titles • • • • • • • • • •

Factory Automation System Inventory System for Small Business Component-Based Case Tool THBT Member Tracing Hospital Management Automation Data Warehouse Office Automation Travel Agency Automation Hospital Automation System Automile Stability Control System E-Commerce for Selling Mobile Phones

3

Project Titles (Contd.) • • • • • • • • • •

Process Metrics

Human Resources System Component-Based Case Tool Modeling of Dormitory Management System General E-Commerce Robot Pet Karabash Pharmacy Automation System Seat Reservation System for Laboratory Environments A Web-Based Application for a Multi-national Company Web-Based Teaching Computer Center Library Automation

Process Metrics Results: Effort UML better

COSEML better

Equal

– Effort: Person-hours spent for the development of a design model – Modification: Effort when any part of a design is revisited – Correction: Effort for revisions after the completion of the design

Process Metrics Results: Modification

Success Comparison based on Number of Projects Total

• Total development, modification, and correction efforts:

Success Comparison based on Number of Projects

Not Applicable

Total

UML better

COSEML better

Equal

Not Applicable

Number of Projects

20

9

5

3

3

Number of Projects

20

6

6

4

4

Percentage (%)

100

45

25

15

15

Percentage (%)

100

30

30

20

20

Success Comparison based on Statistics

Success Comparison based on Statistics

Number of Projects

Total Effort

Mean

Standard Deviation

UML

20

463

23.15

14.07

COSEML

17

365

21.47

12.66

Process Metrics Results: Correction Success Comparison based on Number of Projects Total

UML better

COSEML better

Equal

Not Applicable

Number of Projects

20

5

6

2

7

Percentage (%)

100

25

30

10

35

Success Comparison based on Statistics Number of Projects

Total Effort

Mean

Standard Deviation

UML

15

22.95

1.53

1.23

COSEML

15

31.50

1.85

1.78

Number of Projects

Total Effort

Mean

Standard Deviation

UML

18

80

4.44

3.76

COSEML

17

71

4.18

2.62

Subjective Evaluation Two subjective evaluations: 1. EASE: It was easy to model your problem using UML/COSEML. 2. Understandability: Your model is an understandable representation of the problem.

4

Process Metrics Results: Understandability

Process Metrics Results: Ease Success Comparison based on Number of Projects Total

UML better

COSEML better

Success Comparison based on Number of Projects

Equal

Total

UML better

COSEML better

Equal

Number of Projects

20

6

5

9

Number of Projects

20

6

2

12

Percentage (%)

100

30

25

45

Percentage (%)

100

30

10

60

Success Comparison based on Statistics Number of Projects

Total Grade

UML

20

77

COSEML

20

73

Success Comparison based on Statistics

Product Metrics • Also called Model-Complexity Metrics • Different for UML and COSEML • Cannot be directly compared. Needs different strategies. Results left out of thesis.

Total Grade

UML

20

81

COSEML

20

75

Conclusions • For the small projects involved, COSEML did not display a remarkable drawback, • Further case studies are required, especially to be carried out by more experienced developers.

Product Metrics for Object-Oriented Models

Similar Case Studies in the Field • No similar case studies for component-software • D. A., Boehm-Davis, L. S., Ross,“Program design methodologies and the software development process”, International journal of Man-Machine Sudies, vol. 36, pp. 1-19, 1992. Compared: – Jackson program design – Object-oriented design – Functional decomposition. Used metrics to evaluate solution completeness, time to design and code, and model complexity.

Number of Projects

• • • • • • • •

Number of Classes Number of Objects Number of Subsystems Number of Methods per Class Maximum Depth Maximum Width Number of Compositions Number of Inheritances

5

Product Metrics for Component-Oriented Models • • • • • • • • •

Effort Values for each Project

Number of Boxes Number of Event Links Number of Method Links Number of Methods per Component Number of Interfaces per Component Number of Methods per Interface Number of Subsystems Maximum Depth Maximum Width

70 60 50

30

Total person-hours for COSEML model

10 0 1

3

5

7

9

11

13

15

17

6

C-O

O-O C-O

5

4

4

3

3

2

2

1

1 0

0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Understandability Grade Counts for UML and COSEML

EASE Grade Counts for UML and COSEML No of projects

No of projects

No of projects

No of projects

12

14

16

16

10

12

14

14

12

12

10

10

8

8

6

6

10

8

8 6 6 4 2

Grades

0 1

2

19

Understandability Grades for each Project

O-O

5

Total person-hours for UML model

20

Ease Grades for each Project 6

40

3

4

5

4

4

2

2

0 1

2

3

4

5

Grades

4

Grades

0 1

2

3

4

5

2

Grades

0 1

2

3

4

5

6