AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges
-
Upload
ptidej-team -
Category
Technology
-
view
4.857 -
download
0
description
Transcript of AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges
![Page 1: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/1.jpg)
Yann-Gaël Guéhéneuc
This work is licensed under a Creative Commons Attribution-NonCommercial-
ShareAlike 3.0 Unported License
How and Why Design Patterns Impact Quality and Future Challenges
AsianPLoP, Tokyo, Japan05/03/14
![Page 2: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/2.jpg)
2/184
“Patterns help people to share experience-based proven solutions and design products, manage processes, projects and organizations, and communicate each other more efficiently and effectively.”
http://patterns-wg.fuka.info.waseda.ac.jp/asianplop/
![Page 3: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/3.jpg)
3/184
“Advantages:– Using patterns improves programmer
productivity and program quality– Novices can increase their design skills
significantly by studying and applying patterns– Patterns encourage best practices, even for
experiences designers– Design patterns improve communication, both
among developers and with maintainers”—Zhang and Budgen, 2012
(With minor adaptations)
![Page 4: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/4.jpg)
4/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
![Page 5: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/5.jpg)
5/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
![Page 6: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/6.jpg)
6/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Why?
![Page 7: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/7.jpg)
7/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Why?
How?
![Page 8: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/8.jpg)
8/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 9: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/9.jpg)
9/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 10: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/10.jpg)
10/184
“The captain asked the passengers to fasten the seat belts. They were ready to take off.”
—Kohls and Scheiter, 2008
Christian Kohls and Katharina Scheiter.The Relation between Design Patterns and Schema Theory.Proceedings of the 15th Conference on Pattern Languages of Programs, ACM Press, 2008
![Page 11: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/11.jpg)
11/184
“This situation is an interrelation of events and entities, and is stored in an internal data structure that can be activated by recognizing its typical features. Such data structures, or schemas, are mental representations in an individual’s mind.”
—Kohls and Scheiter, 2008(With minor adaptations)
![Page 12: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/12.jpg)
12/184
“Human brains operate fundamentally in terms of pattern recognition rather than of logic. They are highly constructive in settling on given schema and at the same time are constantly open to error.”
—Edelman, 2006(With minor adaptations)
![Page 13: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/13.jpg)
13/184
![Page 14: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/14.jpg)
14/184
![Page 15: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/15.jpg)
15/184
![Page 16: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/16.jpg)
16/184
![Page 17: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/17.jpg)
17/184
![Page 18: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/18.jpg)
18/184
![Page 19: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/19.jpg)
19/184
Schema
Abstract representation of multiple instances of the same kinds of – Concept– Situation– Plan– Behaviour– …
![Page 20: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/20.jpg)
20/184
“Abstract representation to recognise similar or discriminate dissimilar experiences, access common concepts, draw inferences, create goals, develop plans, use skills.”
—Kohls and Scheiter, 2008(With minor adaptations)
![Page 21: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/21.jpg)
21/184
“Examples of schemata include academic rubrics, social schemas, stereotypes, social roles, scripts, worldviews, and archetypes. In Piaget's theory of development, children adopt a series of schemata to understand the world.”
—Wikipedia, 2014
![Page 22: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/22.jpg)
22/184
Schema
Variables (or slots or attributes)
(Constrained) Ranges of values– People’s experience– Constants – Optional or mandatory
Constraints among variables and their values
![Page 23: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/23.jpg)
23/184
Schema
Variables (or slots or attributes)
(Constrained) Ranges of values– People’s experience– Constants – Optional or mandatory
Constraints among variables and their values
![Page 24: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/24.jpg)
24/184
Schema
Variables (or slots or attributes)
(Constrained) Ranges of values– People’s experience– Constants – Optional or mandatory
Constraints among variables and their values
![Page 25: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/25.jpg)
25/184
Schema
Variables (or slots or attributes)
(Constrained) Ranges of values– People’s experience– Constants – Optional or mandatory
Constraints among variables and their values
![Page 26: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/26.jpg)
26/184
Schema
Prototypical object
![Page 27: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/27.jpg)
27/184
Schema
Prototypical object
![Page 28: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/28.jpg)
28/184
Schema
Prototypical object
Object space and (mental) object generator
![Page 29: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/29.jpg)
29/184
Schema
Prototypical object
Object space and (mental) object generator
![Page 30: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/30.jpg)
30/184
Schema
Prototypical object
Object space and (mental) object generator
![Page 31: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/31.jpg)
31/184
Schema
Prototypical object
Object space and (mental) object generator
![Page 32: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/32.jpg)
32/184
Schema
Relations among schemas
![Page 33: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/33.jpg)
33/184
Schema
Relations among schemas
– Part-of
![Page 34: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/34.jpg)
34/184
Schema
Relations among schemas
– Part-of
![Page 35: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/35.jpg)
35/184
Schema
Relations among schemas
– Coupling
![Page 36: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/36.jpg)
36/184
Schema
Relations among schemas
– Coupling
![Page 37: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/37.jpg)
37/184
Schema
Relations among schemas
– Is-a
![Page 38: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/38.jpg)
38/184
Schema
Relations among schemas
– Is-a
![Page 39: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/39.jpg)
39/184
Schema
Hierarchy– Contexts– Forces– Probabilities
![Page 40: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/40.jpg)
40/184
Schema
Hierarchy– Contexts– Forces– Probabilities
![Page 41: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/41.jpg)
41/184
Schema
Hierarchy– Contexts– Forces– Probabilities
![Page 42: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/42.jpg)
42/184
Schema
![Page 43: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/43.jpg)
43/184
![Page 44: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/44.jpg)
44/184
David Rumelhart and Donald Norman.Accretion, tuning and restructuring: Three modes of learning.Semantic Factors in Cognition, Erlbaum, 1978
![Page 45: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/45.jpg)
45/184
Learning
Comprehension: pattern matching of memorised schema that cooperates and competes
![Page 46: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/46.jpg)
46/184
Learning
Comprehension: pattern matching of memorised schema that cooperates and competes
![Page 47: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/47.jpg)
47/184
Learning
Comprehension: pattern matching of memorised schema that cooperates and competes
![Page 48: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/48.jpg)
48/184
Learning
Comprehension: pattern matching of memorised schema that cooperates and competes
![Page 49: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/49.jpg)
49/184
![Page 50: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/50.jpg)
50/184
Learning
Accretion: specific situation or experience stored in schemas used to reconstruct original experience– Episodic memory– Specific details
![Page 51: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/51.jpg)
51/184
Learning
Accretion: specific situation or experience stored in schemas used to reconstruct original experience– Episodic memory– Specific details
![Page 52: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/52.jpg)
52/184
Learning
Accommodation / Tuning: schemas modifications– Variables– Ranges– Probabilities
![Page 53: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/53.jpg)
53/184
![Page 54: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/54.jpg)
54/184
Learning
Assimilation / Restructuring: schemas creations– Schema generation by analogies with existing
schema, is-a– Schema induction from existing schema, has-a
![Page 55: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/55.jpg)
55/184
Learning
Assimilation / Restructuring: schemas creations– Schema generation by analogies with existing
schema, is-a– Schema induction from existing schema, has-a
![Page 56: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/56.jpg)
56/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 57: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/57.jpg)
57/184
“This situation is an interrelation of events and entities, and is stored in an internal data structure that can be activated by recognizing its typical features. Such data structures, or schemas, are mental representations in an individual’s mind.”
—Kohls and Scheiter, 2008(With minor adaptations)
![Page 58: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/58.jpg)
58/184
“This situation is an interrelation of events and entities, and is stored in an internal data structure that can be activated by recognizing its typical features. Such data structures, or schemas, are mental representations in an individual’s mind.”
—Kohls and Scheiter, 2008(With minor adaptations)
![Page 59: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/59.jpg)
59/184
“This situation is an interrelation of events and entities, and is stored in an internal data structure that can be activated by recognizing its typical features. Such data structures, or schemas, are mental representations in an individual’s mind.”
—Kohls and Scheiter, 2008(With minor adaptations)
“The pattern is an attempt to discover some invariant features, which distinguishes good places from bad places with respect to some particular system of forces.”
—Christopher Alexander, 1979
![Page 60: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/60.jpg)
60/184
Schema– Variables– Ranges of values– Constraints among variables and their values
![Page 61: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/61.jpg)
61/184
Schema– Variables– Ranges of values– Constraints among variables and their values
What class plays this role?
![Page 62: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/62.jpg)
62/184
Schema– Variables– Ranges of values– Constraints among variables and their values
Possible classes playing this roleplus their relations, implementation…
![Page 63: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/63.jpg)
63/184
Schema– Variables– Ranges of values– Constraints among variables and their values
Relations, interactions…
![Page 64: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/64.jpg)
64/184
Comprehension
![Page 65: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/65.jpg)
65/184
Comprehension
![Page 66: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/66.jpg)
66/184
Comprehension
We can identifyin the architectureof a systemsmicro-architectures similar todesign patternsto explain theproblem solved
![Page 67: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/67.jpg)
67/184
Comprehension
We can identifyin the architectureof a systemsmicro-architectures similar todesign patternsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
![Page 68: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/68.jpg)
68/184
Comprehension
We can identifyin the architectureof a systemsmicro-architectures similar todesign patternsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
![Page 69: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/69.jpg)
69/184
Comprehension
We can identifyin the architectureof a systemsmicro-architectures similar todesign patternsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
![Page 70: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/70.jpg)
70/184
Comprehension
We can identifyin the architectureof a systemsmicro-architectures similar todesign patternsto explain theproblem solved
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objectsin a tree-like structureto describe whole–parthierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component)remove(Component)getComponent(int)operation()
ramification
For each componentscomponent.operation()
1..nClient
![Page 71: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/71.jpg)
71/184
“The solution part of a good pattern describes both a process and a thing: the ‘thing’ is created by the ‘process’.”
—Christopher Alexander, 1979
“Furthermore, a pattern tells about a form not only what it is but also what it does.”
—Christopher Alexander, 1964
![Page 72: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/72.jpg)
72/184
“A pattern describes a coherent yet infinite design space, not a finite set of implementations in that space.”
—Frank Buschmann, Kevlin Henney, and Douglas C. Schmidt, 2007
![Page 73: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/73.jpg)
73/184
“A pattern describes a coherent yet infinite design space, not a finite set of implementations in that space.”
—Frank Buschmann, Kevlin Henney, and Douglas C. Schmidt, 2007
![Page 74: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/74.jpg)
74/184
![Page 75: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/75.jpg)
75/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
![Page 76: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/76.jpg)
76/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Why?
![Page 77: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/77.jpg)
77/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Schema Theory
![Page 78: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/78.jpg)
78/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
How?
Schema Theory
![Page 79: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/79.jpg)
79/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 80: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/80.jpg)
80/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 81: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/81.jpg)
81/184
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
![Page 82: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/82.jpg)
82/184
Developers Studies
Studying developers’ thought processes– Yarbus’ eye-movements and vision studies– Just and Carpenter’s eye–mind hypothesis– Palmer’s vision science– …
![Page 83: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/83.jpg)
83/184
Developers Studies
![Page 84: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/84.jpg)
84/184
Developers Studies
Picking into developers’ thought processes
![Page 85: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/85.jpg)
85/184
Developers Studies
Picking into developers’ thought processes
![Page 86: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/86.jpg)
86/184
Developers Studies
Picking into developers’ thought processes
![Page 87: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/87.jpg)
87/184
Developers Studies
Developers’ thought processes– Reading code [Maletic et al.]
– Reading design models [Cepeda and Guéhéneuc]
• Content• Form
– …
![Page 88: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/88.jpg)
88/184
Developers Studies
Developers’ thought processes– Reading code [Maletic et al.]
– Reading design models [Cepeda and Guéhéneuc]
• Content• Form
– …
Gerardo Cepeda Porras and Yann-Gaël Guéhéneuc. An Empirical Study on the Efficiency of Different Design Pattern Representations in UML Class Diagrams.Journal of Empirical Software Engineering, 15(5), Springer, 2010
![Page 89: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/89.jpg)
89/184
Developers Studies
Developers’ use of design pattern notations during program understandability– Strongly visual [Schauer and Keller]
– Strongly textual [Dong et al.]
– Mixed [Vlissides et al.]
![Page 90: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/90.jpg)
90/184
Developers Studies
Independent variables– Design pattern notations– Tasks: Participation, Composition, Role
Dependent variables– Average fixation duration– Ratio of fixations– Ration of fixation times
![Page 91: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/91.jpg)
91/184
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
![Page 92: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/92.jpg)
92/184
Developers Studies
Importance– Understand– Do better
![Page 93: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/93.jpg)
93/184
Developers Studies
Importance– Understand– Do better
![Page 94: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/94.jpg)
94/184
Developers Studies
Importance– Understand– Do better
Limits– Confounding factors– Actionable results?
![Page 95: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/95.jpg)
95/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 96: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/96.jpg)
96/184
Social Studies
Developers’ characteristics– Knowledge [Ng et al.]
– Gender [Sharafi et al.]
– Status [Soh et al.]
– Expertise [Soh et al.]
– Processes [Lavallée and Robillard]
– …
![Page 97: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/97.jpg)
97/184
Social Studies
Developers’ characteristics– Knowledge [Ng et al.]
– Gender [Sharafi et al.]
– Status [Soh et al.]
– Expertise [Soh et al.]
– Processes [Lavallée and Robillard]
– …
![Page 98: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/98.jpg)
98/184
Social Studies
Independent variables– Tasks– Roles
Dependent variables– Use of patterns
– Fault proneness
T. H. Ng, S. C. Cheung, W. K. Chan, Yuen-Tak Yu.Do Maintainers Utilize Deployed Design Patterns Effectively?Proceedings of the 29th ICSE, ACM Press, 2007
![Page 99: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/99.jpg)
99/184
Social Studies
Subjects– 215 under-graduate students– Java programming course – Hong Kong University of Science and
Technology
![Page 100: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/100.jpg)
100/184
Social Studies
Conclusion– Results “support the deployment of design
patterns as they were utilized by most of the subjects to complete the anticipated changes.”
– “Utilizing deployed design patterns does not necessarily mean that better codes are delivered.”
![Page 101: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/101.jpg)
101/184
Social Studies
Importance– Difference among tasks– Visualisation – Documentation
![Page 102: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/102.jpg)
102/184
Importance– Difference among tasks– Visualisation – Documentation
![Page 103: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/103.jpg)
103/184
Importance– Difference among tasks– Visualisation – Documentation
Limits– Confounding factors– Actionable results?
![Page 104: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/104.jpg)
104/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 105: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/105.jpg)
105/184
Code Studies
Design patterns– A general reusable solution to a commonly
occurring problem within a given context in software design
Design antipatterns– A design pattern that may be commonly used
but is ineffective/counterproductive in practice
![Page 106: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/106.jpg)
106/184
Design Patterns
Important assumptions– “Patterns can be codified in such a way that they
can be shared between different designers”
– “Reuse will lead to “better” designs. There is an obvious question here of what constitutes “better”, but a key measure is maintainability”
![Page 107: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/107.jpg)
107/184
Design Patterns
Problem– Problem recurring in object-oriented design
Solution– Repeatable– Effective
![Page 108: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/108.jpg)
108/184
Design Patterns
Positive impact?
![Page 109: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/109.jpg)
109/184
Design Patterns
Positive impact?– Fault proneness
![Page 110: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/110.jpg)
110/184
Design Patterns
Positive impact?– Fault proneness
– Change proneness
![Page 111: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/111.jpg)
111/184
Design Patterns
Positive impact?– Fault proneness
– Change proneness
– Comprehension
![Page 112: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/112.jpg)
112/184
Design Patterns
Positive impact?– Fault proneness
– Change proneness
– Comprehension
T. H. Ng, S. C. Cheung, W. K. Chan, Yuen-Tak Yu.Do Maintainers Utilize Deployed Design Patterns Effectively?Proceedings of the 29th ICSE, ACM Press, 2007
![Page 113: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/113.jpg)
113/184
Design Patterns
Positive impact?– Fault proneness
– Change proneness
Comprehension
T. H. Ng, S. C. Cheung, W. K. Chan, Yuen-Tak Yu.Do Maintainers Utilize Deployed Design Patterns Effectively?Proceedings of the 29th ICSE, ACM Press, 2007
James M. Bieman, Greg Straw, Huxia Wang, P. Willard Munger, Roger T. Alexander.Design Patterns and Change Proneness: An Examination of Five Evolving Systems.Proceedings of the 9th METRICS, IEEE CS Press, 2003
![Page 114: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/114.jpg)
114/184
Design Patterns
Positive impact?– Fault proneness
– Change proneness
Comprehension
T. H. Ng, S. C. Cheung, W. K. Chan, Yuen-Tak Yu.Do Maintainers Utilize Deployed Design Patterns Effectively?Proceedings of the 29th ICSE, ACM Press, 2007
James M. Bieman, Greg Straw, Huxia Wang, P. Willard Munger, Roger T. Alexander.Design Patterns and Change Proneness: An Examination of Five Evolving Systems.Proceedings of the 9th METRICS, IEEE CS Press, 2003
Sébastien Jeanmart, Yann-Gaël Guéhéneuc,Houari A. Sahraoui, Naji Habra.Impact of the Visitor Pattern on Program Comprehension and Maintenance.Proceedings of the 3rd ESEM, IEEE CS Press, 2009
![Page 115: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/115.jpg)
115/184
Code Studies
Design patterns– Codify experts’ experience– Help train novice developers– Help developers’ communicate– Lead to improved quality
![Page 116: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/116.jpg)
116/184
Design Antipatterns
Important assumptions– Poor design choices that are conjectured to
make object-oriented systems harder to maintain
– Yet, maybe the best and possibly only way to implement some requirements and–or some functionalities
![Page 117: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/117.jpg)
117/184
Design Antipatterns
Problem– Problem recurring in object-oriented design
Poor solution– Initially may look like a good idea
Alternative solution– Repeatable (design pattern)– Effective
![Page 118: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/118.jpg)
118/184
Design Antipatterns
Negative impact
![Page 119: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/119.jpg)
119/184
Design Antipatterns
Negative impact– Fault proneness– Change proneness
Foutse Khomh, Massimiliano Di Penta, Yann-Gaël Guéhéneuc, Giuliano Antoniol.An Exploratory Study of the Impact of Antipatterns on Class Change- and Fault-proneness.Empirical Software Engineering, 17(3), Springer, 2012
![Page 120: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/120.jpg)
120/184
Design Antipatterns
Negative impact– Fault proneness– Change proneness
Comprehension
Foutse Khomh, Massimiliano Di Penta, Yann-Gaël Guéhéneuc, Giuliano Antoniol.An Exploratory Study of the Impact of Antipatterns on Class Change- and Fault-proneness.Empirical Software Engineering, 17(3), Springer, 2012
Marwen Abbes, Foutse Khomh, Yann-Gaël Guéhéneuc, Giuliano Antoniol.An Empirical Study of the Impact of Two Antipatterns on Program Comprehension.Proceedings of the 15th CSMR, IEEE CS Press, 2011
![Page 121: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/121.jpg)
121/184
Code Studies
Design antipatterns– Codify experts’ “bad” experience– Help train novice developers– Help developers’ communicate– Lead to decreased quality
![Page 122: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/122.jpg)
122/184
Code Studies
Limits– So many patterns– So many
• Programming languages• Development contexts• Application domains• Expertises
![Page 123: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/123.jpg)
123/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Schema Theory
![Page 124: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/124.jpg)
124/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
How?
Schema Theory
![Page 125: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/125.jpg)
125/184
“Important assumptions– That software patterns can be codified in such a
way that they can be shared between and reused by 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)
Schema Theory
Pattern Studies
![Page 126: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/126.jpg)
126/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 127: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/127.jpg)
127/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 128: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/128.jpg)
128/184
“Quality model are models with the objective to describe, assess, and–or predict quality”
—Deissenboeck et al., WOSQ, 2009(With minor adaptations)
Florian Deissenboeck, Elmar Juergens, Klaus Lochmann, and Stefan Wagner.Software Quality Models: Purposes, Usage Scenarios and Requirements.International Workshop on Software Quality, 24th International Symposium on Computer and Information Sciences, IEEE CS Press, 2009
![Page 129: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/129.jpg)
129/184
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
![Page 130: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/130.jpg)
130/184
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
![Page 131: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/131.jpg)
131/184
Quality Models
Basis for quality models – Software measures (aka metrics)
• LOC• Chidamber and Kemerer• Briand et al.• …
– Relationships among characteristics and metrics• Theoretical• Practical
![Page 132: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/132.jpg)
132/184
Who needs models?
![Page 133: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/133.jpg)
133/184
![Page 134: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/134.jpg)
134/184
•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/archaeology •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
![Page 135: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/135.jpg)
135/184
![Page 136: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/136.jpg)
136/184
![Page 137: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/137.jpg)
137/184
Measures without models!http://hardsci.wordpress.com/2013/09/17/the-hotness-iq-tradeoff-in-academia/
![Page 138: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/138.jpg)
138/184
Modeling formodeling's sake?
![Page 139: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/139.jpg)
139/184
Aristotle384 BC–Mar 7, 322 BC
![Page 140: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/140.jpg)
140/184
Aristotle384 BC–Mar 7, 322 BC
Galileo GalileiFeb 15, 1564–Jan 8, 1642
![Page 141: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/141.jpg)
141/184
Aristotle384 BC–Mar 7, 322 BC
Galileo GalileiFeb 15, 1564–Jan 8, 1642
Isaac NewtonDec 25, 1642–Mar 20, 1727
![Page 142: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/142.jpg)
142/184
Aristotle384 BC–Mar 7, 322 BC
Galileo GalileiFeb 15, 1564–Jan 8, 1642
Isaac NewtonDec 25, 1642–Mar 20, 1727
Max TegmarkMay 5, 1967–
![Page 143: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/143.jpg)
143/184
Quality Models
Different input metrics, output characteristics– Menzies et al.’s models
• Code metrics• Defectiveness
– Zimmermann et al.’s models• Code and historical metrics• Fault-proneness
– Bansiya and Davis’ QMOOD• Design metrics• Maintainability-related characteristics
![Page 144: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/144.jpg)
144/184
Quality Models
Different input metrics, output characteristics– Menzies et al.’s models
• Code metrics• Defectiveness
– Zimmermann et al.’s models• Code and historical metrics• Fault-proneness
– Bansiya and Davis’ QMOOD• Design metrics• Maintainability-related characteristics
![Page 145: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/145.jpg)
145/184
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
Jagdish Bansiya and Carl G. Davis.A Hierarchical Model for Object-oriented Design Quality Assessment.Transactions on Software Engineering, 28(1), IEEE CS Press, 2002
![Page 146: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/146.jpg)
146/184
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(Source code)
![Page 147: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/147.jpg)
147/184
Quality Models
Bansiya and Davis’ QMOOD
![Page 148: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/148.jpg)
148/184
Quality Models
Conclusions– Sound basis to measure different quality
characteristics
Limits– Relation between metrics and quality
characteristics, such as maintainability– Relation between metrics and design choices,
good practices…
![Page 149: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/149.jpg)
149/184
Quality Models
Limits
![Page 150: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/150.jpg)
150/184
Quality Models
Limits– Relation between metrics and quality
characteristics, such as maintainability
![Page 151: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/151.jpg)
151/184
Quality Models
Limits– Relation between metrics and quality
characteristics, such as maintainability– Relation between metrics and design
choices, good practices…
![Page 152: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/152.jpg)
152/184
“Having an ideal concept of a thing lets one judge the beauty of it.”
—Kohls and Scheiter, 2008
“For Alexander, patterns are not an end in themselves, they are only a means to an end; his objective is to generate the quality without a name”
—Kelly, 2012
![Page 153: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/153.jpg)
153/184
Quality Models
Feedback– Measures– Occurrences– Factors
to build “better” quality models
![Page 154: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/154.jpg)
154/184
Quality Models
Feedback– Measures– Occurrences– Factors
to build “better” quality models
![Page 155: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/155.jpg)
155/184
Agenda
Why?– Schema, Learning, and Patterns
How?– Developers, Social, and Code Studies
Challenges– Quality Models– Multi-language Systems
![Page 156: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/156.jpg)
156/184
What’s with today’s systems?
![Page 157: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/157.jpg)
157/184
![Page 158: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/158.jpg)
158/184
![Page 159: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/159.jpg)
159/184
![Page 160: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/160.jpg)
160/184
![Page 161: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/161.jpg)
161/184
![Page 162: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/162.jpg)
162/184
![Page 163: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/163.jpg)
163/184
![Page 164: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/164.jpg)
164/184
![Page 165: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/165.jpg)
165/184
![Page 166: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/166.jpg)
166/184
![Page 167: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/167.jpg)
167/184
Multi-language Systems
Today’s systems are multi-languages– Facebook– Twitter– …
– Even your “regular” software system is now multi-language, typically a Web application
![Page 168: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/168.jpg)
168/184
Multi-language Systems
New problems– Different computational models– Complex interfaces (API)– Wrong assumptions– Wrong conversions– …
![Page 169: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/169.jpg)
169/184
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++
Gang Tan and Jason Croft.An Empirical Security Study of the Native Code in the JDK.Proceedings of the 17th Security Symposium, USENIX Association, 2008
![Page 170: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/170.jpg)
170/184
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– …
![Page 171: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/171.jpg)
171/184
Multi-language Systems
Different computational models
![Page 172: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/172.jpg)
172/184
Multi-language Systems
Different computational modelsstatic 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;...
}
![Page 173: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/173.jpg)
173/184
Multi-language Systems
Different computational modelsstatic 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 setjmp(…) or related calls!
![Page 174: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/174.jpg)
174/184
Multi-language Systems
Different computational modelsstatic 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!
No setjmp(…) or related calls!
![Page 175: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/175.jpg)
175/184
What challenges?
![Page 176: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/176.jpg)
176/184
Unbalanced focus on “mono”-language systems vs. multi-language systems
![Page 177: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/177.jpg)
177/184
Multi-language Systems
Maintainability– Quality models
• Metrics?• Relations?
– Patterns• “Border-line” practices?
– Social and developers studies• Independent variables?
![Page 178: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/178.jpg)
178/184
Conclusion
![Page 179: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/179.jpg)
179/184
![Page 180: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/180.jpg)
180/184
![Page 181: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/181.jpg)
181/184
![Page 182: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/182.jpg)
182/184
![Page 183: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/183.jpg)
183/184
Future directions
![Page 184: AsianPLoP'14: How and Why Design Patterns Impact Quality and Future Challenges](https://reader033.fdocuments.in/reader033/viewer/2022052522/554f6babb4c905c8088b5215/html5/thumbnails/184.jpg)
184/184
Multi-language system quality models
– Definition and modelling– Computation– Characterisation– Impact