Patterns and Anti-Patterns: History and accomplished...
Transcript of Patterns and Anti-Patterns: History and accomplished...
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Patterns and Anti-Patterns: History andaccomplished work
Venera Arnaoudova
Ecole Polytechnique de Montreal, Quebec, Canada
March 5th, 2013
Venera Arnaoudova March 5th, 2013 1 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Christopher AlexanderHis workWhy patterns?What is a Pattern?What is a Pattern Language?
Christopher Alexander
Image from wikipedia.org
Who is he?
Born in 1936 in Vienna,Austria
Architect
Emeritus Professor ofArchitecture at theUniversity of California,Berkeley
Venera Arnaoudova March 5th, 2013 2 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Christopher AlexanderHis workWhy patterns?What is a Pattern?What is a Pattern Language?
Christopher Alexander and his work
Images from http://www.patternlanguage.com/
Venera Arnaoudova March 5th, 2013 3 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Christopher AlexanderHis workWhy patterns?What is a Pattern?What is a Pattern Language?
Why patterns?
You have a problem?
Maybe there is asolution out there
Built on experience
By experts
Venera Arnaoudova March 5th, 2013 4 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Christopher AlexanderHis workWhy patterns?What is a Pattern?What is a Pattern Language?
What is a Pattern?
Imagehttp://www.patternlanguage.com/
What is a Pattern?
A recurring problem
The core of the solution to thatproblem
“You can use this solution a million timesover, without ever doing it the same waytwice.” [Alexander et al., 1977]
Example
Entrance transition
Venera Arnaoudova March 5th, 2013 5 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Christopher AlexanderHis workWhy patterns?What is a Pattern?What is a Pattern Language?
What is a Pattern Language?
Entrance transition→Intimacy Gradient→...Light on two sides ofevery room→...
Venera Arnaoudova March 5th, 2013 6 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Who introduced them?What is a Software Design Pattern?Architectural vs Software Design Patterns
Software Design Patterns (DPs)
Introduced
Interfaces in Smalltalk [Beck and Cunningham, 1987]
C++ Idioms [Coplien, 1992]
ET++ [Gamma, 1992]
First draft in ECOOP in 1993 by Gamma et al.
Popularized
“Design Patterns: Elements of Reusable Object-OrientedSoftware”, by GoF [Gamma et al., 1994]
23 solutions to common software design problems
Venera Arnaoudova March 5th, 2013 7 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Who introduced them?What is a Software Design Pattern?Architectural vs Software Design Patterns
Software Design Patterns
What is a Software Design Pattern?
A recurring design problem in object-oriented systems
A general design solution that addresses this problem
Purpose
Creational
Structural
Behavioral
Scope
Class
Object
Venera Arnaoudova March 5th, 2013 8 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Who introduced them?What is a Software Design Pattern?Architectural vs Software Design Patterns
Software Design Patterns
Architectural... CA
Top down approach - pattern language
“Each pattern sits at the center of a network of connections whichconnect it to certain other patterns that help to complete it... andit is the network of these connections between patterns whichcreates the language” [Alexander, ’79]
Software... GoF
Bottom up approach - micro-architectures
“If you have a problem, we have the solution for that, but we don’thave the next step.” [Gamma, ’05]
Venera Arnaoudova March 5th, 2013 9 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionExperience in industryMaintenanceFault and Change proneness
Detection
Pattern detection for Smalltalk programs [Brown, ’96]
Pat system [Kramer and Prechelt, ’96]
Metrics and graph (AOL) [Antoniol et al., ’98, ’01]
Columbus-Maisa [Ferenc et al., ’02]
Constraint programming [Gueheneuc et al., ’01, ’04, ’08]
Static and dynamic analysis [Heuzeroth et al., ’02, ’03]
Similarity scoring between graph vertices [Tsantalis, ’06]
DPRE [Costagliola et al., ’05], [De Lucia et al., ’09]
LAMBDES-DP [Bayley and Zhu, ’10]
Venera Arnaoudova March 5th, 2013 10 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionExperience in industryMaintenanceFault and Change proneness
Experience in Industry
Patterns sound very promising, but how are they actually usedin the industry and what benefits, if any, do they bring inpractice? [Beck et al., 1996]
[Beck et al., 1996] Kent Beck, Ron Crocker, Gerard Meszaros,John Vlissides, James O. Coplien, Lutz Dominick, and FrancesPaulisch. Industrial experience with design patterns (ICSE ’96)
Venera Arnaoudova March 5th, 2013 11 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionExperience in industryMaintenanceFault and Change proneness
Maintenance
Controlled experiments
DP versus simpler solutions for maintenance tasks [Prechelt etal., ’01]
Explicit documentation [Prechelt et al., ’02]
Replications with variations [Vokac et al., 2004], [Krein et al.,’11], [Gravino et al., ’11, ’12]
Impact of Visitor on modification tasks and comprehension(eye-tracker) [Jeanmart et al., ’09]
Different DP representations in UML class diagrams forcomprehension (eye-tracker) [Porras and Gueheneuc, ’10]
Venera Arnaoudova March 5th, 2013 12 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionExperience in industryMaintenanceFault and Change proneness
Maintenance
Re-engineering
Re-classification [Tahvildari and Kontogiannis, 2002]
Maintainability
Impact of DP on maintainability (as defined by ISO/IEC 9126standard) [Hegedus et al., 2012]
Opinion of Experts
On the help of DP during maintenance [Khomh andGueheneuc, 2008]
Venera Arnaoudova March 5th, 2013 13 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionExperience in industryMaintenanceFault and Change proneness
Fault and Change Proneness
Fault proneness
Defect rate of classes [Vokac, 2004]
Do Maintainers Utilize Deployed Design Patterns Effectively?[Ng et al., 2007]
Change proneness
Do DP promote adaptable and reusable code? [Bieman, ’03]
Type, frequency of changes, co-changes [Aversano et al., ’07]
Roles played in DP and change proneness [Di Penta et al., ’08]
Venera Arnaoudova March 5th, 2013 14 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Software Anti-Patterns
Introduced...
Patterns and Anti-Patterns [Koenig, 1995]
Pitfalls Of Object Oriented Development [Webster, 1995]
Popularized...
“AntiPatterns: Refactoring Software, Architectures, andProjects in Crisis” [Brown et al., 1998]
AntiPatterns clarify problems for software developers, architects,and managers by identifying the symptoms and consequences thatlead to the dysfunctional software development processes. [Brownet al., 1998]
Venera Arnaoudova March 5th, 2013 15 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Anti-Patterns
What is an Anti-Pattern?
A problem
A recurring solution that addresses this problem but withnegative consequences
A refactored good solution
Types
Architectural
Design
Management
Venera Arnaoudova March 5th, 2013 16 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionRelation with quality
Detection
jCosmo [Van Emden and Moonen, ’02]
PRODEOOS, iPlasma [Marinescu et al., ’01, ’02, ’04, ’05]
Van [Ratiu et al., ’04]
DECOR, DETEX [Moha et al., ’10]
IDS [Hassaine et al., ’10]
BDETEX [Khom et al., ’09, ’11]
SMURF [Maiga et al., ’12]
Venera Arnaoudova March 5th, 2013 17 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
DetectionRelation with quality
Relation with Quality
Understandability and maintainability [Deligiannis et al., ’03,’04]
Program comprehension [Bois et al., ’06], [Abbes et al., ’11]
Change proneness [Khom et al., ’09, ’11], [Olbrich et al. ’09],[Romano et al., ’12]
Fault proneness [Wei and Shatnawi, ’07], [Khom et al., ’11]
Track the evolution [Ratiu et al., ’04], [Vaucher et al., ’09]
Relations with patterns [Jaafar, ’13]
Venera Arnaoudova March 5th, 2013 18 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Families of Patterns
Only a small subset of pattern families
Requirement [Duran, ’99], [Withall, ’07]
Architectural [Gamma et al., ’94], [Fowler, ’02]
Design [Gamma et al, ’94]
Testing [Binder, ’94], [Meszaros, ’07]
User Interface [Tidwell, ’02, ’10], [Duyne, ’03]
SOA [Rotem-Gal-Oz, ’12], [Erl et al., ’12]
SQL [Tropashko, ’07]
Security [Wheeler, ’99], [Bishop, ’03]
Venera Arnaoudova March 5th, 2013 19 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Families of Anti-Patterns
Only a small subset of AP families
Architectural, design [Brown et al., ’98, ’99, ’00]
Java, J2EE [Tate, ’02], [Tate et al., ’03], [Dudney et al., ’03]
Performance [Smith, ’03]
Requirement [Shoemaker, ’07]
SQL [Karwin, ’10]
API: API Evolution [Kim et al., 2007], Python API Design[Martelli, ’11], Web API Evolution [Daigneau, ’12]
Linguistic [Abebe et al., ’09], [Arnaoudova et al., ’10, ’13]
Venera Arnaoudova March 5th, 2013 20 / 21
Architecture and Urban DesignSoftware Design Patterns
Life cycle of Design PatternsSoftware Anti-Patterns (APs)
Life cycle of Anti-PatternsFamilies of Patterns
Families of Anti-Patterns
Thank you for your attention!
Venera Arnaoudova March 5th, 2013 21 / 21