Quality and Multi-language Systems Yann-Gal Guhneuc KAIST - - PowerPoint PPT Presentation

quality and multi language systems
SMART_READER_LITE
LIVE PREVIEW

Quality and Multi-language Systems Yann-Gal Guhneuc KAIST - - PowerPoint PPT Presentation

Quality and Multi-language Systems Yann-Gal Guhneuc KAIST 13/10/14 This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License 2/126 Typical software developers? 3/126 4/126 Software


slide-1
SLIDE 1

Yann-Gaël Guéhéneuc

This work is licensed under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported License

Quality and Multi-language Systems

KAIST 13/10/14

slide-2
SLIDE 2

2/126

slide-3
SLIDE 3

3/126

Typical software developers?

slide-4
SLIDE 4

4/126

slide-5
SLIDE 5

5/126

Software costs?

slide-6
SLIDE 6

6/126

slide-7
SLIDE 7

7/126

slide-8
SLIDE 8

8/126

Cost of bugs

http://www.di.unito.it/~damiani/ariane5rep.html

slide-9
SLIDE 9

9/126

slide-10
SLIDE 10

10/126

slide-11
SLIDE 11

11/126

Cost of quality

http://calleam.com/WTPF/?p=4914

slide-12
SLIDE 12

12/126

Agenda

 Quality

– Quality Models – Good Practices – Social Studies – Developers Studies

 Impact of Quality Models  Challenges with Multi-language Systems

slide-13
SLIDE 13

13/126

qual·i·ty noun \ˈkwä-lə-tē\ : how good or bad something is : a characteristic or feature that someone

  • r something has : something that can

be noticed as a part of a person or thing : a high level of value or excellence —Merriam-Webster, 2013

slide-14
SLIDE 14

14/126

Quality

 Division of software quality according to

ISO/IEC 9126:2001 and 25000:2005

– Process quality – Product quality – Quality in use

slide-15
SLIDE 15

15/126

Quality

 Division of software quality according to

ISO/IEC 9126:2001 and 25000:2005

– Process quality – Product quality – Quality in use

slide-16
SLIDE 16

16/126

Quality

 Dimensions of product quality

– Functional vs. non-functional

  • At runtime vs. structural

– Internal vs. external

  • Maintainability vs. usability

– Metric-based vs. practice-based

  • Objective vs. subjective
slide-17
SLIDE 17

17/126

Quality

 Dimensions of product quality

– Functional vs. non-functional

  • At runtime vs. structural

– Internal vs. external

  • Maintainability vs. usability

– Metric-based vs. practice-based

  • Objective vs. subjective
slide-18
SLIDE 18

18/126

Quality

 Definitions of internal quality characteristics

– Maintainability – Flexibility – Portability – Re-usability – Readability – Testability – Understandability

slide-19
SLIDE 19

19/126

Quality

 Definitions of internal quality characteristics

– Maintainability – Flexibility – Portability – Re-usability – Readability – Testability – Understandability

slide-20
SLIDE 20

20/126

Maintainability is the ease with which a software system can be modified —IEEE Standard Glossary of Software Engineering Terminology, 2013

slide-21
SLIDE 21

21/126

Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures

slide-22
SLIDE 22

22/126

Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures

slide-23
SLIDE 23

23/126

Quality model are models with the objective to describe, assess, and–or predict quality —Deissenboeck et al., WOSQ, 2009

(With minor adaptations)

slide-24
SLIDE 24

24/126

Quality Models

 Division of quality models according to

Deissenboeck et al.

– Describe quality characteristics and their relationships – Assess the quality characteristics of some software systems – Predict the future quality of some software systems

slide-25
SLIDE 25

25/126

Quality Models

 Division of quality models according to

Deissenboeck et al.

– Describe quality characteristics and their relationships – Assess the quality characteristics of some software systems – Predict the future quality of some software systems

slide-26
SLIDE 26

26/126

Quality Models

 Basis for quality models

– Software measures (aka metrics) – Relationships among characteristics and metrics

  • Theoretical
  • Practical
slide-27
SLIDE 27

27/126

Quality Models

 Metrics have been well researched

– Chidamber and Kemerer – Hitz and Montazeri – Lorenz and Kidd – McCabe – …

(Do not miss Briand et al.’s surveys

  • n cohesion and coupling metrics)
slide-28
SLIDE 28

28/126

slide-29
SLIDE 29

29/126

Who needs models?

slide-30
SLIDE 30

30/126

slide-31
SLIDE 31

31/126

  • 130.0 Physics
  • 129.0 Mathematics
  • 128.5 Computer Science
  • 128.0 Economics
  • 127.5 Chemical engineering
  • 127.0 Material science
  • 126.0 Electrical engineering
  • 125.5 Mechanical engineering
  • 125.0 Philosophy
  • 124.0 Chemistry
  • 123.0 Earth sciences
  • 122.0 Industrial engineering
  • 122.0 Civil engineering
  • 121.5 Biology
  • 120.1 English/literature
  • 120.0 Religion/theology
  • 119.8 Political science
  • 119.7 History
  • 118.0 Art history
  • 117.7 Anthropology/archeology
  • 116.5 Architecture
  • 116.0 Business
  • 115.0 Sociology
  • 114.0 Psychology
  • 114.0 Medicine
  • 112.0 Communication
  • 109.0 Education
  • 106.0 Public administration
slide-32
SLIDE 32

32/126

slide-33
SLIDE 33

33/126

slide-34
SLIDE 34

34/126

Measures without models

http://hardsci.wordpress.com/2013/09/17/the-hotness-iq-tradeoff-in-academia/

slide-35
SLIDE 35

35/126

Quality Models

 Different input metrics, different output

characteristics

– Bansiya and Davis’ QMOOD

  • Design metrics
  • Maintainability-related characteristics

– Zimmermann et al.’s models

  • Code and historical metrics
  • Fault-proneness

– …

slide-36
SLIDE 36

36/126

Quality Models

 Different input metrics, different output

characteristics

– Bansiya and Davis’ QMOOD

  • Design metrics
  • Maintainability-related characteristics

– Zimmermann et al.’s models

  • Code and historical metrics
  • Fault-proneness

– …

slide-37
SLIDE 37

37/126

Quality Models

 Bansiya and Davis’ QMOOD

– Characteristics of maintainability

  • Effectiveness, extensibility, flexibility, functionality,

reusability, and understandability

– Hierarchical model

  • Structural and behavioural design properties of

classes, objects, and their relationships

slide-38
SLIDE 38

38/126

Quality Models

 Bansiya and Davis’ QMOOD

– Object-oriented design metrics

  • Encapsulation, modularity, coupling, and cohesion…
  • 11 metrics in total

– Validation using empirical and expert opinion on several large commercial systems

  • 9 C++ libraries
slide-39
SLIDE 39

39/126

Quality Models

 Bansiya and Davis’ QMOOD

slide-40
SLIDE 40

40/126

Quality Models

 Conclusions

– Sound basis to measure different quality characteristics

 Limits

– Relation between metrics and quality characteristics, such as maintainability – Relation between metrics and what they are expected to measure

slide-41
SLIDE 41

41/126

Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures

slide-42
SLIDE 42

42/126

slide-43
SLIDE 43

43/126

Practice, practice and practice more

slide-44
SLIDE 44

44/126

slide-45
SLIDE 45

45/126

Good Practices

 Maintainers can follow good practices

– SOLID – Design patterns – Design antipatterns – …

slide-46
SLIDE 46

46/126

Good Practices

 Maintainers can follow good practices

– SOLID – Design patterns – Design antipatterns – …

slide-47
SLIDE 47

47/126

Each pattern describes a problem which

  • ccurs over and over in our environment,

and then describes the core of the solution to that problem, in such way that you can use this solution a million times over, without ever doing it the same way twice. —Christopher Alexander, 1977

(With minor adaptations)

slide-48
SLIDE 48

48/126

Good Practices

 Design patterns

– A general reusable solution to a commonly

  • ccurring problem within a given context in

software design

 Design antipatterns

– A design pattern that may be commonly used but is ineffective/counterproductive in practice

slide-49
SLIDE 49

49/126

Good Practices

slide-50
SLIDE 50

50/126

Important assumptions

– That patterns can be codified in such a way that they can be shared between different designers – That reuse will lead to “better” designs. There is an obvious question here of what constitutes “better”, but a key measure is maintainability

—Zhang and Budgen, 2012

(With minor adaptations)

slide-51
SLIDE 51

51/126

Good Practices

 Pattern solution = Motif which

connotes an elegant architecture

slide-52
SLIDE 52

52/126

Good Practices

 Pattern solution = Motif which

connotes an elegant architecture

slide-53
SLIDE 53

53/126

Good Practices

 Pattern solution = Motif which

connotes an elegant architecture

slide-54
SLIDE 54

54/126

Good Practices

We can identify in the architecture

  • f a systems

micro-architectures similar to design motifs to explain the problem solved

Figure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

To compose objects in a tree-like structure to describe whole–part hierarchies

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component
  • peration()
Leaf
  • peration()
Composite add(Component) remove(Component) getComponent(int)
  • peration()
ramification For each components component.operation() 1..n Client
slide-55
SLIDE 55

55/126

Good Practices

We can identify in the architecture

  • f a systems

micro-architectures similar to design motifs to explain the problem solved

Figure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

To compose objects in a tree-like structure to describe whole–part hierarchies

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component
  • peration()
Leaf
  • peration()
Composite add(Component) remove(Component) getComponent(int)
  • peration()
ramification For each components component.operation() 1..n Client
slide-56
SLIDE 56

56/126

Good Practices

We can identify in the architecture

  • f a systems

micro-architectures similar to design motifs to explain the problem solved

Figure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

To compose objects in a tree-like structure to describe whole–part hierarchies

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component
  • peration()
Leaf
  • peration()
Composite add(Component) remove(Component) getComponent(int)
  • peration()
ramification For each components component.operation() 1..n Client
slide-57
SLIDE 57

57/126

Good Practices

We can identify in the architecture

  • f a systems

micro-architectures similar to design motifs to explain the problem solved

Figure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

To compose objects in a tree-like structure to describe whole–part hierarchies

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure Component
  • peration()
Leaf
  • peration()
Composite add(Component) remove(Component) getComponent(int)
  • peration()
ramification For each components component.operation() 1..n Client
slide-58
SLIDE 58

58/126

Good Practices

 Conclusions

– Codify experts’ experience – Help train novice developers – Help developers’ communicate – Lead to improved quality

slide-59
SLIDE 59

59/126

Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures

slide-60
SLIDE 60

60/126

Social Studies

 Developers’ characteristics

– Gender – Status – Expertise – Training – Processes – …

slide-61
SLIDE 61

61/126

slide-62
SLIDE 62

62/126

Agile programming, anyone?

slide-63
SLIDE 63

63/126

slide-64
SLIDE 64

64/126

Social Studies

 Need for social studies, typically in the form

  • f experiments

– Independent variable (few) – Dependent variables (many) – Statistical analyses (few) – Threats to validity (many)

slide-65
SLIDE 65

65/126

Social Studies

 For example, impact on identifiers on

program understandability

– Identifier styles [Sharif, Binkley] – Identifier quality [Lawrie] – Developers’ gender and identifiers [Sharafi] – …

slide-66
SLIDE 66

66/126

Social Studies

 For example, impact on identifiers on

program understandability

– Identifier styles [Sharif, Binkley] – Identifier quality [Lawrie] – Developers’ gender and identifiers [Sharafi] – …

slide-67
SLIDE 67

67/126

Social Studies

 Independent variables

– Gender: male vs. female – Identifier: camel case vs. underscore

 Dependent variables

– Accuracy – Time – Effort

slide-68
SLIDE 68

68/126

Social Studies

 Subjects  Conclusions

Subjects’ Demography (24 Subjects)

Academic background Gender

Ph.D. M.Sc. B.Sc. Male Female

11 10 3 15 9

Accuracy Time Effort

slide-69
SLIDE 69

69/126

Maintainability Quality Models Models Good Practices Definition Metrics Detection Occurrences Social Studies Characteristics Developers Studies Behaviour Factors Measures

slide-70
SLIDE 70

70/126

Developers Studies

 Developers’ thought processes

– Cognitive theories

  • Brooks’
  • Von Mayrhauser’s
  • Pennington’s
  • Soloway’s

– Mental models

  • Gentner and Stevens’ mental models

– Memory theories

  • Kelly’s categories
  • Minsky’s frames
  • Piaget’s schema
  • Schank’s scripts
slide-71
SLIDE 71

71/126

Developers Studies

 Studying developers’

thought processes

– Yarbus’ eye-movements and vision studies – Just and Carpenter’s eye–mind hypothesis – Palmer’s vision science – …

slide-72
SLIDE 72

72/126

Developers Studies

 Picking into developers’ thought processes

slide-73
SLIDE 73

73/126

Developers Studies

 Picking into developers’ thought processes

slide-74
SLIDE 74

74/126

Developers Studies

 Picking into developers’ thought processes

slide-75
SLIDE 75

75/126

Developers Studies

 Developers’ thought processes

– Reading code – Reading design models

  • Content
  • Form

– …

slide-76
SLIDE 76

76/126

Developers Studies

 Developers’ thought processes

– Reading code – Reading design models

  • Content
  • Form

– …

slide-77
SLIDE 77

77/126

Developers Studies

 Developers’ use of design pattern notations

during program understandability

– Strongly visual [Schauer and Keler] – Strongly textual [Dong et al.] – Mixed [Vlissides]

slide-78
SLIDE 78

78/126

Developers Studies

 Independent variables

– Design pattern notations – Tasks: Participation, Composition, Role

 Dependent variables

– Average fixation duration – Ratio of fixations – Ration of fixation times

slide-79
SLIDE 79

79/126

Developers Studies

 Subjects

– 24 Ph.D. and M.Sc. students

 Conclusions

– Stereotype-enhanced UML diagram [Dong et al.] more efficient for Composition and Role – UML collaboration notation and the pattern- enhanced class diagrams more efficient for Participation

slide-80
SLIDE 80

80/126

Feedback Loop

 Use

– Measures – Occurrences – Factors

to build “better” quality models

slide-81
SLIDE 81

81/126

slide-82
SLIDE 82

82/126

Modeling for modeling's sake?

slide-83
SLIDE 83

83/126

Aristote

384 BC–Mar 7, 322 BC

slide-84
SLIDE 84

84/126

Aristote

384 BC–Mar 7, 322 BC

Galileo Galilei

Feb 15, 1564–Jan 8, 1642

slide-85
SLIDE 85

85/126

Aristote

384 BC–Mar 7, 322 BC

Galileo Galilei

Feb 15, 1564–Jan 8, 1642

Isaac Newton

Dec 25, 1642–Mar 20, 1727

slide-86
SLIDE 86

86/126

Aristote

384 BC–Mar 7, 322 BC

Galileo Galilei

Feb 15, 1564–Jan 8, 1642

Isaac Newton

Dec 25, 1642–Mar 20, 1727

Max Tegmark

May 5, 1967–

slide-87
SLIDE 87

87/126

Aristote

384 BC–Mar 7, 322 BC

Galileo Galilei

Feb 15, 1564–Jan 8, 1642

Usefulness?

Isaac Newton

Dec 25, 1642–Mar 20, 1727

Max Tegmark

May 5, 1967–

slide-88
SLIDE 88

88/126

Impact of Quality Models

 DSIV

– SNCF IT department – 1,000+ employees – 200+ millions Euros – Mainframes to assembly to J2EE – 2003

  • Quality team
slide-89
SLIDE 89

89/126

Impact of Quality Models

 MQL

– Dedicated measurement process

slide-90
SLIDE 90

90/126

Impact of Quality Models

 MQL

– Web-based reports

slide-91
SLIDE 91

91/126

Impact of Quality Models

 Independent variables

– Use of MQL or not – LOC; team size, maturity, and nature

 Dependent variables

– Maintainability, evolvability, reusability, robustness, testability, and architecture quality – Corrective maintenance effort (in time) – Proportions of complex/unstructured code and of commented methods/functions

slide-92
SLIDE 92

92/126

Impact of Quality Models

 Subjects

– 44 systems

  • 22 under MQL (QA=1)
  • 22 under ad-hoc processes (QA=0)
slide-93
SLIDE 93

93/126

Impact of Quality Models

slide-94
SLIDE 94

94/126

Impact of Quality Models

slide-95
SLIDE 95

95/126

Impact of Quality Models

slide-96
SLIDE 96

96/126

Impact of Quality Models

slide-97
SLIDE 97

97/126

Impact of Quality Models

 Conclusions

– Impact on all dependent variables – Statistical practical significance

 Limits

– Applicability to today’s software systems

slide-98
SLIDE 98

98/126

slide-99
SLIDE 99

99/126

What’s with today’s systems?

slide-100
SLIDE 100

100/126

slide-101
SLIDE 101

101/126

slide-102
SLIDE 102

102/126

slide-103
SLIDE 103

103/126

slide-104
SLIDE 104

104/126

slide-105
SLIDE 105

105/126

slide-106
SLIDE 106

106/126

slide-107
SLIDE 107

107/126

slide-108
SLIDE 108

108/126

slide-109
SLIDE 109

109/126

slide-110
SLIDE 110

110/126

Challenges with Multi-language Systems

 Today’s systems are multi-languages

– Facebook – Twitter – … – Even your “regular” software system is now multi-language, typically a Web application

slide-111
SLIDE 111

111/126

Challenges with Multi-language Systems

 New challenges

– Different computational models – Complex interfaces (API) – Wrong assumptions – Wrong conversions – …

slide-112
SLIDE 112

112/126

Challenges with Multi-language Systems

 For example, control- and data-flows

between Java and “native” C/C++ code

 native methods in Java are used by Java

classes but (typically) implemented in C/C++

slide-113
SLIDE 113

113/126

Challenges with Multi-language Systems

 Control-flow interactions

– Java code calls native code – Native code calls Java methods – Native code can “throw” and must catch exceptions

 Data-flow interactions

– Java code passes objects (pointers) – Native code creates objects – …

slide-114
SLIDE 114

114/126

Challenges with Multi-language Systems

 Different computational models

slide-115
SLIDE 115

115/126

Challenges with Multi-language Systems

 Different computational models

static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... }

slide-116
SLIDE 116

116/126

Challenges with Multi-language Systems

 Different computational models

static void *xmalloc(JNIEnv *env, size_t size) { void *p = malloc(size); if (p == NULL) JNU_ThrowOutOfMemoryError(env, NULL); return p; } #define NEW(type, n) ((type *) xmalloc(env, (n) * sizeof(type))) static const char *const *splitPath(JNIEnv *env, const char *path) { ... pathv = NEW(char *, count+1); pathv[count] = NULL; ... }

No diversion of control flow!

slide-117
SLIDE 117

117/126

slide-118
SLIDE 118

118/126

Conclusion

slide-119
SLIDE 119

119/126

slide-120
SLIDE 120

120/126

slide-121
SLIDE 121

121/126

slide-122
SLIDE 122

122/126

slide-123
SLIDE 123

123/126

Future directions

slide-124
SLIDE 124

124/126

slide-125
SLIDE 125

125/126

slide-126
SLIDE 126

126/126

 Multi-language system quality characteristics

– Definition and modelling – Computation – Characterisation – Impact

slide-127
SLIDE 127

127/126

slide-128
SLIDE 128

128/126

Good Practices

 Martin and Feather’s SOLID

– Single responsibility – Open/closed – Liskov substitution – Interface segregation – Dependency inversion

slide-129
SLIDE 129

129/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

slide-130
SLIDE 130

130/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

slide-131
SLIDE 131

131/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design motifs and a motif meta-model

slide-132
SLIDE 132

132/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design motifs and a motif meta-model

slide-133
SLIDE 133

133/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design Meta-model Design motifs and a motif meta-model

slide-134
SLIDE 134

134/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design Meta-model Design motifs and a motif meta-model

slide-135
SLIDE 135

135/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design Meta-model Design motifs and a motif meta-model

slide-136
SLIDE 136

136/126

Good Practices

 What motifs and what model for these

motifs?

 What model for the program architecture?  How to perform the identification?

Design Meta-model Design motifs and a motif meta-model

slide-137
SLIDE 137

137/126

Good Practices

 Multi-layer framework for design motif

identification

 Information retrieval

– Search space – Query – Results

slide-138
SLIDE 138

138/126

Good Practices

 Multi-layer framework

for design motif identification

Code Model Model + Associations, aggregations Model + Associations, aggregations, and composition

slide-139
SLIDE 139

139/126

Good Practices

 Constraint satisfaction problem solved with

explanation-based constraint programming (e-CP) to obtain

– No a priori descriptions of variations – Justification of the identified micro-architectures – Strong interaction with the developers

slide-140
SLIDE 140

140/126

Good Practices – Example

 Design motif ( )

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

slide-141
SLIDE 141

141/126

Good Practices – Example

 Example of JHotDraw

– Erich Gamma and Thomas Eggenschwiler – 2D drawing – Design patterns

slide-142
SLIDE 142

142/126

Good Practices – Example

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

slide-143
SLIDE 143

143/126

Good Practices – Example

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

slide-144
SLIDE 144

144/126

Good Practices – Example

 Micro-architecture ( )  Maintainability  Understandability

Figure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

slide-145
SLIDE 145

145/126

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

slide-146
SLIDE 146

146/126

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

slide-147
SLIDE 147

147/126

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

slide-148
SLIDE 148

148/126

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

slide-149
SLIDE 149

149/126

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

slide-150
SLIDE 150

150/126

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

< < < <

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

slide-151
SLIDE 151

151/126

Frame DrawingEditor Tool Handle Panel DrawingView Drawing Figure AbstractFigure CompositeFigure AttributeFigure PolyLineFigure DecoratorFigure

e-CP

V = {component, leaf, composite} C = {leaf < component, composite < component, composite component} D = {DrawingEditor, DrawingView…}

< < < <

Component

  • peration()

Leaf

  • peration()

Composite

add(Component) remove(Component) getComponent(int)

  • peration()

ramification

For each components component.operation()

1..n Client

slide-152
SLIDE 152

152/126

Good Practices

 Search space can

be very large and the efficiency in time of the search very low

 Use metrics and

topology to reduce the search space