SlideShare a Scribd company logo
1
Design Patterns: A Round-trip
A trip in the marvellous
country of design pattern
application and detection
Good afternoon Ladies and Gentlemen.
The topic is about design patterns: How to apply them, and how to detect
them.
(This handout is an improved version of the talk given at OTI, on Tuesday,
August 21st, 2001. It corrects some minor defects in the talk and in the
comments. A re-factored and much improved version will be available later,
based on the comments received after the presentation and a discussion with
Kevin McGuire.)
2
n Hervé Albin-Amiot
– 3rd year PhD student
– Partly funded by Soft-Maint, S.A. (France)
n Yann-Gaël Guéhéneuc
– 2nd year PhD student
– Partly funded by Object Technology
International, Inc. (Canada)
n Pr. Pierre Cointe
– Supervisor
n Dr. Narendra Jussien
– Assistant-professor Constraints Team
My name is Yann… As most of you already know ;-)
I served several co-op terms at OTI.
I am now a PhD student at the École des Mines de Nantes.
I work with Pr. Pierre Cointe, Dr. Narendra Jussien and another PhD
student, Hervé Albin-Amiot.
Our common interest is software engineering, and the improvement of
software quality.
In this presentation, I will first summarize the reasons why we talk about
design patterns.
Then, I will present the current state of our research.
3
One observation
n Software quality
– ISO/IEC 9126
• Functionality, reliability, usability, efficiency,
maintainability, portability
– ISO/IEC 14598
– Coupling, cohesion, method replacement…
n Maintenance = 75%
n Design defects
Here is one observation.
Quality is very important.
And quality is a challenge for software developers.
But quality is very subjective, even if some authors propose kind of
“objective” tools, such as metrics, there is no consensus on what a good
design is, it’s too context-dependent.
As a proof, just look at the many standards for software quality and the
many independent quality characteristics.
The ISO 9126 standard is a standard that divides software quality in six
characteristics.
And so on…
So now, what is the reason to be concerned by software quality?
If you take maintenance, for instance, maintenance is (at least) 75% of the
life-cycle of a software.
It takes lots of time, of effort, and of people.
It cost billions of dollars each year.
How to decrease maintenance time? We must improve software quality!
How to improve software quality? We must look for design defects!
4
One classification
n Intra-class / Inter-class / Behavioural
Number: 39/61 (64%)
Detection–correction: 25%
Number: 13/61 (21%)
Detection–correction: 8%
In OO programming languages, we define three categories of design
defects:
•Intra-class design defects are related to the internal structure of the classes.
For example, unused fields.
•Inter-class design defects are related to the external structure of the classes,
to their public interfaces. For example, a “middle-man” is a class with too
many delegating methods.
•Behavioural design defects are related to the semantics of the classes. For
example, the Y2K bug.
We made a survey of the literature on design defects.
We found that:
•Intra-class design defects, studied a lot, well-known.
•Inter-class design defects, studied a little bit, rely on “feelings”, “bad
smells”, “heuristics”, …
5
One long-term plan
n To identify inter-class design defects
– Classification
– Automated detection mechanisms
+
n To correct inter-class design defects
– Solutions
– Automated correction mechanisms
Those are the reasons why our long-term plan is to help in identifying
and correcting inter-class design defects.
From our classification of design defects, we would like:
•To propose a methodology and the tools to automate the detectionof inter-
class design defects.
•To propose solutions and the tools to automate the correction of those
defects.
6
On inter-class design defects
n Design patterns are useful when:
– Designing / implementing / Re-engineering
– Documenting
n [Gamma et al. 1994]
– Quality architectural solutions
• Flexibility, understandability
– Language independent
• General Smalltalk- or C++-level
– Domain independent
Now, when we started our research, we looked around and we tried to find
related problems.
That’s how we came to ask the question: “What’s the link between design
defects and design patterns?”
Design patterns are useful
•To design.
•To implement.
•To re-engineer.
•To document.
They are good solutions to recurring architectural problems.
And they are language and context independent.
That’s true, at least, for the design patterns presented by the GoF.
Especially, in the GoF, they emphasize the idea that design patterns
improve the flexibility and understandability of the software.
7
On inter-class design defects
n Design patterns, design defects = dual
problems
n Working hypotheses
– Groups of entities similar to a design
pattern = Inter-class design defects
+
– Making these groups of entities closer to a
design pattern = Improving architectural
quality (flexibility and understandability)
Then, because design patterns affect the software quality, we can assume
that there is a connection between design patterns and architectural
quality. More precisely, that design patterns and design defects are dual
problems.
From this observation, we propose two working hypotheses:
•We make the hypothesis that groups of entities that look like a design
pattern, but not quite, represent a design defect.
•We make the hypothesis that transforming these groups of entities (such
that they look more closely like a design pattern) actually improves the
overall architectural quality.
Those are working hypotheses, you may disagree with them, and I will
be glad to discuss them with you. But, we use them as a starting point and
we may confirm or refute them later on.
8
Our short-term goals
n Design patterns are difficult to use
– Lack of formalism
– Lack of automation
n We want to provide
round-trip using
design patterns
From software quality, we went to design defects.
From design defects, we went to design patterns.
So, what do we want, now?
We want:
•To help designers.
•To help maintainers.
In using design patterns.
(We do not want to replace them.)
We propose the notion of design patterns round-trip.
Round-trip is the seamless application and detection of design patterns
(of design pattern solution micro-architectures).
9
Our short-term goals
n We need
– A common description for design patterns
• Application viewpoint
• Detection viewpoint
– A way to apply physically design patterns
– A way to detect physically design patterns
Œ
•
Ž
To offer design pattern round-trip, we need:
•A common description for design patterns, specifically tailored towards
application and detection. Several authors already proposed formalisms for
design patterns, but none designed with round-trip in mind.
•A way to apply a design pattern. That is, we need a way to modify or to
generate source code.
•A way to detect a design pattern. That is, we need a way to retrieve in
random source code the design patterns present.
In the rest of this presentation, I will focus on those three points one after
the other. If I have time left, I will present two tools we developed to apply
and to detect design patterns. Then, I will conclude on some future work.
10
Œ
n We need a common description for
design patterns
– Application viewpoint
– Detection viewpoint
The starting point is a common description for design patterns. This
description must be specifically oriented towards application and detection.
11
Meta-modelŒ
The accepted way to describe or to formalize a design pattern is using a
meta-model. Several meta-models exist for design patterns, the one we
developed is different in that it comprises all the entities, elements, and
mechanisms needed to define, to apply, and to detect a design pattern.
A design pattern is defined as a subclass of class Pattern, for instance, the
Composite design pattern.
A design pattern is defined using the entities and elements offered by the
meta-model (new entities and new elements may be added).
A design pattern is defined as a first-class entity in our system, we can
manipulate it as we would manipulate a class and its instances (through
message sends).
12
Informal descriptions
from [Gamma et al.]
Instance of class PDelegation
Instance of class PInterface
Instance of class PClass
Instance of class PAssoc
name() Instance of class PMethod
Instance of class Pattern
Pattern, PInterface, PClass, PAssoc,
PDelegation, and PMethod are
classes defined in our meta-model
Translates into
Abstract model of CompositeŒ
Let’s take an example.
From the description and the OMT diagram proposed by the GoF for the
Composite pattern.
We extract all the needed information and we formalize the design pattern
using our meta-model.
Here you can see the Composite pattern abstract model, where each entities
and elements are instances of constituents of our meta-model.
We call this an abstract model because it represents the design pattern
solution, independently of any context, specific cardinality, and so on.
13
Abstract model
n Each constituent of the meta-model
deliver its associated code
– New language are added using an
instance of the Visitor design pattern
– Modifications of an existing source code is
(only) provided for Java using JavaXL
n Each constituent of the meta-model
detect its associated instances
Œ
An abstract model is a first-class entity in our system.
It know how to generate the source code associated with itself.
It know how to detect its own instances in source code.
14
Abstract model
Composite pattern abstract model
Composite pattern concrete model 1 Composite pattern concrete model n
PatternsBox •
• •
Composite pattern concrete model 1
(source code)
Composite pattern concrete model n
(source code)
•• ‚‚
Ptidej ‚
‚ ‚
Œ
To understand fully what is an abstract model, consider the following
example.
We developed two tools, I will present these tools more in details later (if
we have some time left ;-).
From the Composite design pattern abstract model, PatternsBox allows us
“to concretize” this abstract model. This means that we can specify role
names, cardinalities... This is basically like a parameterization of the
abstract model. The results are, for instance, two concrete models:
•One representing a dummy example (on the left).
•One representing a sub-set of the Java AWT hierarchy (on the right).
From these concrete models, we can generate the corresponding source
code.
Now, we have this second tool, Ptidej, which from the source code (any
source code), builds back concrete models of a given design pattern
abstract model.
15
•
n We need a way to apply physically
design patterns
– At the source code level
– With as few modifications as possible
The second point deals with the application of a design pattern in a given
source code.
Because we want to help the developers and the maintainers to use
design patterns, we must apply design patterns at the source code level
(level where the developers and maintainers work) while modifying the
source code as little as possible.
16
JavaXL
n Extension to the Java reflection APIs
n Working at the source code level
n Modifying the user source code as little
as possible
n Modifications are reversible
•
We developed an extension of the Java reflection APIs. This extension
works at the source code level, to the contrary of already existing
extensions, such as Javassit or OpenJava.
The modifications are minimal and reversible.
17
JavaXL
n High-level abstraction
– Multiple language
– No semantics
n High-level interface
– Specific Java implementation to VAJ
– Refactorings (Eclipse, Grant Gayed)
•
Basically, JavaXL defines high-level abstractions, that are language
independent and that provide no semantic checks.
JavaXL is also a high-level interface that hides implementation details.
So far, we have a Java-specific implementation, closely related to VAJ.
But we can imagine to have a version working on top of refactorings, such
as the one implemented in Eclipse or using XML and the mechanisms
proposed by Grant Gayed.
18
Singleton
n Example of the Singleton pattern
for (Iterator i = aClass.getConstructors().iterator();
i.hasNext();) {
XMethod currentMethod = (XMethod) i.next();
currentMethod.setModifiers(Modifier.PRIVATE);
}
XField xf = new XField();
xf.setModifiers(Modifier.STATIC & Modifier.PRIVATE);
xf.setName("soleInstance");
…
Basic
A
Example:•
Here is a basic example of JavaXL in action.
This is an extract from the transformation needed to apply the Singleton
pattern.
In the loop, for each constructor of the class represented by aClass, we
create an instance of XMethod and we modify its modifiers.
Then, we create an instance of XField, set its modifiers to static-private,
then we name this field “soleInstance” and so on…
19
Ž
n We need a way to detect physically
design patterns
– Use of a design pattern solution
• Well written code
• Notion of complete version
– Other uses of a design pattern solution
• Code improvement
• Notion of proximal version
+ No up-front descriptions of the variations
The third and last point concerns the detection of design patterns.
What is important to notice, is that design patterns are never applied “by
the rules”, there are always adapted and modified.
We need a mechanism able to detect the use of design pattern solutions is
well-written code, that is the notion of complete solutions. And a
mechanism able to detect the variations of a design pattern solutions in to-
be-improved code, that is the notion proximal solutions.
20
Complete and proximal versions
n Related works
– The search of sub-graphs in a graph
– The adaptation phase in case-based
reasoning
– Logic programming
ÆExplanation-based constraint
programming (e-Constraints)
Ž
There are several related work, although none is specifically oriented
towards the detection of the complete and proximal solutions.
What is important, is that we do not want to describe a priori the
variations.
We do not want / we cannot think about all the variations beforehand.
Thus, we need:
•Explanations for why there is or not solutions.
•A way to know why a solution is a solution.
•A way to look for more solutions.
•A strong user interaction.
All these requirements led us to look at explanation-based constraint
programming, a.k.a. e-Constraints.
21
e-Constraints
n Set of constraints justifying an
action performed by the solver
–Value removal
–Contradiction
n Trace of the solver behaviour
Ž
An explanation is a set of constraints that justify an action performed by the
solver (value removals, contradiction...)
Explanations are computed by tracing the behaviour of the solver.
22
e-Constraints
n An implementation: PaLM
–Developed by Narendra Jussien, on
top of Choco, written in Claire
–Used for
• Path-Repair
• Mac-DBT
• Assistance upon failure
• Interactive solvers
Ž
We have an implementation of e-Constraints: the PaLM system, which uses
Choco and Claire.
The PaLM system is developed by Narendra Jussien at the École des Mines.
This system has been used (its explanations) to:
•Provide assistance upon failure (debugging tools).
•Design interactive solvers (dynamic addition and removal of
constraints).
•Design new search algorithm (guided by the explanations).
It is a reliable and efficient implementation of e-Constraints.
23
Our application
n The design pattern abstract model
– A class defines a variable
– Relationships among classes define
constraints
n The source code of the application
– The classes define the domain of the
variables
– Relationships among classes give the
semantics of the constraints
Ž
In our application of e-Constraints.
We define a CSP using a design pattern abstract model and the given
source code.
From the design pattern abstract model:
•A class defines a variable
•Relationships among classes define constraints
From the source code of the application:
•The classes define the domain of the variables
•Relationships among classes give the semantics of the constraints
24
Our application
n e-Constraints enables
– Complete and proximal versions
– Justifications
• Explain why / how a solution is a solution
• Explain why / how the code is modified
– Strong interactivity with the user
• Dynamic description of the variations
Ž
Programming is an artistic activity, in the sense that there are no good
designs but best designs depending on the context (expected life time, cost,
experience of the developer…).
We need the justification provided by e-Constraints to explain why and how
a solution is solution, thus why and how the code is to be modified.
A complete solution = A solution with all the constraints.
A proximal solution = A solution with some constraints removed.
The idea is to associate a reason for a constraint to be there. This reason
may be textual, but it may also contain executable code, written in terms
of JavaXL, to provide the transformations needed to correct the code.
We need to interact heavily with the developer: We cannot / do not want
to think about all the possible cases!
25
n The Composite design pattern solution
n Its constraints
ConstraintsBasic
A
Example:
composite < component
leaf < component
composite ⊃ component
Ž
For example, if we take the Composite design pattern abstract model.
The constraint associated with this model are …
These constraints are automatically generated by the abstract model,
we come back to the point that we want a common description of design
pattern tailored for application and generation.
(Beware of the < symbol which is different from the object-oriented way of
thinking.)
26
InteractionBasic
A
Example:
composite < component
leaf < component
composite ⊃ component
Ž
From the constraints, and given a source code, the e-Constraints PaLM
system allow us to find all the complete solutions; and, to find all the
proximal solutions (or at least, the ones we are interested in) by
removing or adding constraint dynamically.
Of course, we can potentially explore an exponential universe, but it does
not matter because the user directs the search and stops it when she judges
that it does not make sense to remove constraints further.
27
n We needed
– A common description for design patterns
• Application viewpoint
• Detection viewpoint
– A way to apply physically design patterns
– A way to detect physically design patterns
Œ + • + Ž = PatternsBox + Ptidej
Basic
A
Example
Œ
•
Ž
28
Application
n PatternsBox is a tool to
instantiate design
patterns from a
repository of patterns
Basic
A
Example:
29
Application
n From the pattern, we
access the pattern
description
Basic
A
Example:
30
Application
n We adapt actors and
roles to the current
context
Basic
A
Example:
31
Application
n The tool generates the code required
for the design pattern in Java
public interface MyComponent {
public abstract void myOperation();
}
public class MyComposite implements MyComponent {
// Association: myChildren
private java.util.Vector myChildren = new java.util.Vector();
public void add (MyComponent myComponent) {
myChildren.addElement(myComponent);
}
public void remove (MyComponent myComponent) {
myChildren.removeElement(myComponent);
}
// Method linked to: myChildren
public void myOperation() {
for (Enumeration enum = myChildren.elements();
enum.hasMoreElements(); ((MyComponent)
enum.nextElement()).myOperation());
}
}
public class MyLeaf implements MyComponent {
public void myOperation() {
}
}
Basic
A
Example:
32
Detection
n Ptidej detects instances
of an abstract model
Basic
A
Example:
33
Detection
n It generates a CSP from the design
Basic
A
Example:
34
DetectionBasic
A
Example:
n The PaLM e-Constraint solver
35
Detection
n It highlights design patterns
Basic
A
Example:
36
Detection
n It shows the differences
Basic
A
Example:
37
Correction
n It applies the source transformations
Basic
A
Example:
38
Back to the future
n Design pattern, design defects = dual
problems
– Meta-model, abstract model
– Source-to-source transformation engine
– e-Constraints
n Two tools
Œ + • + Ž = PatternsBox + Ptidej
= Round-trip
So, in this (long ;-) presentation, I talked about software quality, and how
it is related to design defects, and how those are related to design
patterns.
Then, I presented a meta-model to express design patterns. This meta-
model is tailored towards detection and application. I introduced the
concepts of abstract and concrete models.
Then, I presented JavaXL. JavaXL is an extension to the Java reflection
API. We use JavaXL to modify the source code. These modifications are as
small as possible.
And, then, I presented a new paradigm of constraint programming,
explanation-based constraint programming, a.k.a. e-Constraints. We use e-
Constraints to detect complete and proximal versions of a design pattern.
Finally, I briefly show two tools, PatternsBox and Ptidej, implementing
our ideas.
39
Future
n Meta-model, abstract models
– [Gamma et al. 1994] design patterns
– Design defects
n Source-to-source transformation engine
– Refactorings
n e-Constraints
– Interaction
– Previous solutions as knowledge
First, we would like to improve the meta-model and develop design
patterns and design defects abstract models.
Second, we will enhance the source-to-source transformation engine, to
integrate it with refactorings, either to use refactorings or to develop
refactorings with it.
Finally, we will improve the interaction and the automation of the constraint
system. And we are investigating the use of previous solutions as
knowledge to help the developers in their choices.
40
Future
And, of course, because the future is already there, we are integrating our
tools with Eclipse!
Ptidej, the detection tool, is already half-done.
PatternsBox, JavaXL should come out soon…
Thank you very much for your attention.
If you have any question or comment, please feel free to ask.
If you want a demo, feel free to ask!
You may also contact us at:
•cointe@emn.fr (Team leader ;-)
•jussien@emn.fr (e-Constraints, www.e-constraints.net)
•albin@emn.fr (Application, JavaXL, PatternsBox,
www.emn.fr/albin)
•guehene@emn.fr (Detection, Ptidej, Eclipse, www.yann-
gael.gueheneuc.net/Work/)

More Related Content

What's hot

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
Asma CHERIF
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
jinaldesailive
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
Priyanka Pradhan
 
Modeling and meta-modeling presentation at LTH, Sweden
Modeling and meta-modeling presentation at LTH, Sweden Modeling and meta-modeling presentation at LTH, Sweden
Modeling and meta-modeling presentation at LTH, Sweden Saïd Assar
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)stanbridge
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
Mindfire Solutions
 
Design pattern
Design patternDesign pattern
Design pattern
Jasdhir Singh
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applications
Saïd Assar
 
How I Learned To Apply Design Patterns
How I Learned To Apply Design PatternsHow I Learned To Apply Design Patterns
How I Learned To Apply Design Patterns
Andy Maleh
 
Bridging the gap between AI and UI - DSI Vienna - full version
Bridging the gap between AI and UI - DSI Vienna - full versionBridging the gap between AI and UI - DSI Vienna - full version
Bridging the gap between AI and UI - DSI Vienna - full version
Liad Magen
 
The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and Questioning
Sue Sentance
 
Applying design patterns
Applying design patternsApplying design patterns
Applying design patterns
YogeshwaranT
 
MetaScience: Holistic Approach for Research Modeling and Analysis
MetaScience: Holistic Approach for Research Modeling and AnalysisMetaScience: Holistic Approach for Research Modeling and Analysis
MetaScience: Holistic Approach for Research Modeling and Analysis
Jordi Cabot
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
ppd1961
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
naveen kumar
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Fáber D. Giraldo
 
NLP Project Presentation
NLP Project PresentationNLP Project Presentation
NLP Project Presentation
Aryak Sengupta
 
Creational Patterns
Creational PatternsCreational Patterns
Creational Patterns
Asma CHERIF
 
Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)
Aniruddha Chakrabarti
 
Partial Models: Towards Modeling and Reasoning with Uncertainty
Partial Models: Towards Modeling and Reasoning with UncertaintyPartial Models: Towards Modeling and Reasoning with Uncertainty
Partial Models: Towards Modeling and Reasoning with UncertaintyMichalis Famelis
 

What's hot (20)

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Basic design pattern interview questions
Basic design pattern interview questionsBasic design pattern interview questions
Basic design pattern interview questions
 
Behavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka PradhanBehavioral pattern By:-Priyanka Pradhan
Behavioral pattern By:-Priyanka Pradhan
 
Modeling and meta-modeling presentation at LTH, Sweden
Modeling and meta-modeling presentation at LTH, Sweden Modeling and meta-modeling presentation at LTH, Sweden
Modeling and meta-modeling presentation at LTH, Sweden
 
Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)Cs 1023 lec 9 design pattern (week 2)
Cs 1023 lec 9 design pattern (week 2)
 
Let us understand design pattern
Let us understand design patternLet us understand design pattern
Let us understand design pattern
 
Design pattern
Design patternDesign pattern
Design pattern
 
Meta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applicationsMeta-modeling: concepts, tools and applications
Meta-modeling: concepts, tools and applications
 
How I Learned To Apply Design Patterns
How I Learned To Apply Design PatternsHow I Learned To Apply Design Patterns
How I Learned To Apply Design Patterns
 
Bridging the gap between AI and UI - DSI Vienna - full version
Bridging the gap between AI and UI - DSI Vienna - full versionBridging the gap between AI and UI - DSI Vienna - full version
Bridging the gap between AI and UI - DSI Vienna - full version
 
The I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and QuestioningThe I in PRIMM - Code Comprehension and Questioning
The I in PRIMM - Code Comprehension and Questioning
 
Applying design patterns
Applying design patternsApplying design patterns
Applying design patterns
 
MetaScience: Holistic Approach for Research Modeling and Analysis
MetaScience: Holistic Approach for Research Modeling and AnalysisMetaScience: Holistic Approach for Research Modeling and Analysis
MetaScience: Holistic Approach for Research Modeling and Analysis
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Gof design pattern
Gof design patternGof design pattern
Gof design pattern
 
Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...Analysing the concept of quality in model-driven engineering literature: a sy...
Analysing the concept of quality in model-driven engineering literature: a sy...
 
NLP Project Presentation
NLP Project PresentationNLP Project Presentation
NLP Project Presentation
 
Creational Patterns
Creational PatternsCreational Patterns
Creational Patterns
 
Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)Design Patterns (Examples in .NET)
Design Patterns (Examples in .NET)
 
Partial Models: Towards Modeling and Reasoning with Uncertainty
Partial Models: Towards Modeling and Reasoning with UncertaintyPartial Models: Towards Modeling and Reasoning with Uncertainty
Partial Models: Towards Modeling and Reasoning with Uncertainty
 

Similar to 010821+presentation+oti.ppt

Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
DrYogeshDeshmukh1
 
Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)
evabl444
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
Kuwait10
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
AMITJain879
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questionsjbashask
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
Dr. C.V. Suresh Babu
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
Protelo, Inc.
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architecturesMajong DevJfu
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseKenan Sevindik
 
Interaction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender SystemsInteraction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender Systems
University of Bergen
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
kim.mens
 
Unit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptxUnit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptx
Ravindranath67
 
Generation of Automatic Code using Design Patterns
Generation of Automatic Code using Design PatternsGeneration of Automatic Code using Design Patterns
Generation of Automatic Code using Design Patterns
IRJET Journal
 
L05 Design Patterns
L05 Design PatternsL05 Design Patterns
L05 Design Patterns
Ólafur Andri Ragnarsson
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering
Ivano Malavolta
 
Design final
Design finalDesign final
Design final
Indu Sharma Bhardwaj
 
User centered design workshop
User centered design workshopUser centered design workshop
User centered design workshopPatrick McNeil
 

Similar to 010821+presentation+oti.ppt (20)

Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)Experimenting with eXtreme Design (EKAW2010)
Experimenting with eXtreme Design (EKAW2010)
 
Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10Software Engineering with Objects (M363) Final Revision By Kuwait10
Software Engineering with Objects (M363) Final Revision By Kuwait10
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questions
 
Patterns Overview
Patterns OverviewPatterns Overview
Patterns Overview
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Why Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software EngineeringWhy Design Patterns Are Important In Software Engineering
Why Design Patterns Are Important In Software Engineering
 
04 designing architectures
04 designing architectures04 designing architectures
04 designing architectures
 
Contemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With EnterpriseContemporary Software Engineering Practices Together With Enterprise
Contemporary Software Engineering Practices Together With Enterprise
 
Cnpm bkdn
Cnpm bkdnCnpm bkdn
Cnpm bkdn
 
Interaction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender SystemsInteraction Design Patterns in Recommender Systems
Interaction Design Patterns in Recommender Systems
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptxUnit-1 OOAD Introduction.pptx
Unit-1 OOAD Introduction.pptx
 
Generation of Automatic Code using Design Patterns
Generation of Automatic Code using Design PatternsGeneration of Automatic Code using Design Patterns
Generation of Automatic Code using Design Patterns
 
L05 Design Patterns
L05 Design PatternsL05 Design Patterns
L05 Design Patterns
 
[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering[2017/2018] RESEARCH in software engineering
[2017/2018] RESEARCH in software engineering
 
Design final
Design finalDesign final
Design final
 
User centered design workshop
User centered design workshopUser centered design workshop
User centered design workshop
 

More from Yann-Gaël Guéhéneuc

Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0
Yann-Gaël Guéhéneuc
 
Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5
Yann-Gaël Guéhéneuc
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1
Yann-Gaël Guéhéneuc
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Yann-Gaël Guéhéneuc
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
Yann-Gaël Guéhéneuc
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9
Yann-Gaël Guéhéneuc
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
Yann-Gaël Guéhéneuc
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its Consequences
Yann-Gaël Guéhéneuc
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
Yann-Gaël Guéhéneuc
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Yann-Gaël Guéhéneuc
 
Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2
Yann-Gaël Guéhéneuc
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1
Yann-Gaël Guéhéneuc
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
Yann-Gaël Guéhéneuc
 
ICSOC'21
ICSOC'21ICSOC'21
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
Yann-Gaël Guéhéneuc
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
Yann-Gaël Guéhéneuc
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
Yann-Gaël Guéhéneuc
 
Msr20.ppt
Msr20.pptMsr20.ppt
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt

More from Yann-Gaël Guéhéneuc (20)

Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0Some Pitfalls with Python and Their Possible Solutions v1.0
Some Pitfalls with Python and Their Possible Solutions v1.0
 
Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5Advice for writing a NSERC Discovery grant application v0.5
Advice for writing a NSERC Discovery grant application v0.5
 
Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1Ptidej Architecture, Design, and Implementation in Action v2.1
Ptidej Architecture, Design, and Implementation in Action v2.1
 
Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22Evolution and Examples of Java Features, from Java 1.7 to Java 22
Evolution and Examples of Java Features, from Java 1.7 to Java 22
 
Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3Consequences and Principles of Software Quality v0.3
Consequences and Principles of Software Quality v0.3
 
Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9Some Pitfalls with Python and Their Possible Solutions v0.9
Some Pitfalls with Python and Their Possible Solutions v0.9
 
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...
 
An Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its ConsequencesAn Explanation of the Halting Problem and Its Consequences
An Explanation of the Halting Problem and Its Consequences
 
Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0Are CPUs VMs Like Any Others? v1.0
Are CPUs VMs Like Any Others? v1.0
 
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
Informaticien(ne)s célèbres (v1.0.2, 19/02/20)
 
Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2Well-known Computer Scientists v1.0.2
Well-known Computer Scientists v1.0.2
 
On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1On Java Generics, History, Use, Caveats v1.1
On Java Generics, History, Use, Caveats v1.1
 
On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6On Reflection in OO Programming Languages v1.6
On Reflection in OO Programming Languages v1.6
 
ICSOC'21
ICSOC'21ICSOC'21
ICSOC'21
 
Vissoft21.ppt
Vissoft21.pptVissoft21.ppt
Vissoft21.ppt
 
Service computation20.ppt
Service computation20.pptService computation20.ppt
Service computation20.ppt
 
Serp4 iot20.ppt
Serp4 iot20.pptSerp4 iot20.ppt
Serp4 iot20.ppt
 
Msr20.ppt
Msr20.pptMsr20.ppt
Msr20.ppt
 
Iwesep19.ppt
Iwesep19.pptIwesep19.ppt
Iwesep19.ppt
 
Icsoc20.ppt
Icsoc20.pptIcsoc20.ppt
Icsoc20.ppt
 

Recently uploaded

Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 

Recently uploaded (20)

Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 

010821+presentation+oti.ppt

  • 1. 1 Design Patterns: A Round-trip A trip in the marvellous country of design pattern application and detection Good afternoon Ladies and Gentlemen. The topic is about design patterns: How to apply them, and how to detect them. (This handout is an improved version of the talk given at OTI, on Tuesday, August 21st, 2001. It corrects some minor defects in the talk and in the comments. A re-factored and much improved version will be available later, based on the comments received after the presentation and a discussion with Kevin McGuire.)
  • 2. 2 n Hervé Albin-Amiot – 3rd year PhD student – Partly funded by Soft-Maint, S.A. (France) n Yann-Gaël Guéhéneuc – 2nd year PhD student – Partly funded by Object Technology International, Inc. (Canada) n Pr. Pierre Cointe – Supervisor n Dr. Narendra Jussien – Assistant-professor Constraints Team My name is Yann… As most of you already know ;-) I served several co-op terms at OTI. I am now a PhD student at the École des Mines de Nantes. I work with Pr. Pierre Cointe, Dr. Narendra Jussien and another PhD student, Hervé Albin-Amiot. Our common interest is software engineering, and the improvement of software quality. In this presentation, I will first summarize the reasons why we talk about design patterns. Then, I will present the current state of our research.
  • 3. 3 One observation n Software quality – ISO/IEC 9126 • Functionality, reliability, usability, efficiency, maintainability, portability – ISO/IEC 14598 – Coupling, cohesion, method replacement… n Maintenance = 75% n Design defects Here is one observation. Quality is very important. And quality is a challenge for software developers. But quality is very subjective, even if some authors propose kind of “objective” tools, such as metrics, there is no consensus on what a good design is, it’s too context-dependent. As a proof, just look at the many standards for software quality and the many independent quality characteristics. The ISO 9126 standard is a standard that divides software quality in six characteristics. And so on… So now, what is the reason to be concerned by software quality? If you take maintenance, for instance, maintenance is (at least) 75% of the life-cycle of a software. It takes lots of time, of effort, and of people. It cost billions of dollars each year. How to decrease maintenance time? We must improve software quality! How to improve software quality? We must look for design defects!
  • 4. 4 One classification n Intra-class / Inter-class / Behavioural Number: 39/61 (64%) Detection–correction: 25% Number: 13/61 (21%) Detection–correction: 8% In OO programming languages, we define three categories of design defects: •Intra-class design defects are related to the internal structure of the classes. For example, unused fields. •Inter-class design defects are related to the external structure of the classes, to their public interfaces. For example, a “middle-man” is a class with too many delegating methods. •Behavioural design defects are related to the semantics of the classes. For example, the Y2K bug. We made a survey of the literature on design defects. We found that: •Intra-class design defects, studied a lot, well-known. •Inter-class design defects, studied a little bit, rely on “feelings”, “bad smells”, “heuristics”, …
  • 5. 5 One long-term plan n To identify inter-class design defects – Classification – Automated detection mechanisms + n To correct inter-class design defects – Solutions – Automated correction mechanisms Those are the reasons why our long-term plan is to help in identifying and correcting inter-class design defects. From our classification of design defects, we would like: •To propose a methodology and the tools to automate the detectionof inter- class design defects. •To propose solutions and the tools to automate the correction of those defects.
  • 6. 6 On inter-class design defects n Design patterns are useful when: – Designing / implementing / Re-engineering – Documenting n [Gamma et al. 1994] – Quality architectural solutions • Flexibility, understandability – Language independent • General Smalltalk- or C++-level – Domain independent Now, when we started our research, we looked around and we tried to find related problems. That’s how we came to ask the question: “What’s the link between design defects and design patterns?” Design patterns are useful •To design. •To implement. •To re-engineer. •To document. They are good solutions to recurring architectural problems. And they are language and context independent. That’s true, at least, for the design patterns presented by the GoF. Especially, in the GoF, they emphasize the idea that design patterns improve the flexibility and understandability of the software.
  • 7. 7 On inter-class design defects n Design patterns, design defects = dual problems n Working hypotheses – Groups of entities similar to a design pattern = Inter-class design defects + – Making these groups of entities closer to a design pattern = Improving architectural quality (flexibility and understandability) Then, because design patterns affect the software quality, we can assume that there is a connection between design patterns and architectural quality. More precisely, that design patterns and design defects are dual problems. From this observation, we propose two working hypotheses: •We make the hypothesis that groups of entities that look like a design pattern, but not quite, represent a design defect. •We make the hypothesis that transforming these groups of entities (such that they look more closely like a design pattern) actually improves the overall architectural quality. Those are working hypotheses, you may disagree with them, and I will be glad to discuss them with you. But, we use them as a starting point and we may confirm or refute them later on.
  • 8. 8 Our short-term goals n Design patterns are difficult to use – Lack of formalism – Lack of automation n We want to provide round-trip using design patterns From software quality, we went to design defects. From design defects, we went to design patterns. So, what do we want, now? We want: •To help designers. •To help maintainers. In using design patterns. (We do not want to replace them.) We propose the notion of design patterns round-trip. Round-trip is the seamless application and detection of design patterns (of design pattern solution micro-architectures).
  • 9. 9 Our short-term goals n We need – A common description for design patterns • Application viewpoint • Detection viewpoint – A way to apply physically design patterns – A way to detect physically design patterns Œ • Ž To offer design pattern round-trip, we need: •A common description for design patterns, specifically tailored towards application and detection. Several authors already proposed formalisms for design patterns, but none designed with round-trip in mind. •A way to apply a design pattern. That is, we need a way to modify or to generate source code. •A way to detect a design pattern. That is, we need a way to retrieve in random source code the design patterns present. In the rest of this presentation, I will focus on those three points one after the other. If I have time left, I will present two tools we developed to apply and to detect design patterns. Then, I will conclude on some future work.
  • 10. 10 Œ n We need a common description for design patterns – Application viewpoint – Detection viewpoint The starting point is a common description for design patterns. This description must be specifically oriented towards application and detection.
  • 11. 11 Meta-modelŒ The accepted way to describe or to formalize a design pattern is using a meta-model. Several meta-models exist for design patterns, the one we developed is different in that it comprises all the entities, elements, and mechanisms needed to define, to apply, and to detect a design pattern. A design pattern is defined as a subclass of class Pattern, for instance, the Composite design pattern. A design pattern is defined using the entities and elements offered by the meta-model (new entities and new elements may be added). A design pattern is defined as a first-class entity in our system, we can manipulate it as we would manipulate a class and its instances (through message sends).
  • 12. 12 Informal descriptions from [Gamma et al.] Instance of class PDelegation Instance of class PInterface Instance of class PClass Instance of class PAssoc name() Instance of class PMethod Instance of class Pattern Pattern, PInterface, PClass, PAssoc, PDelegation, and PMethod are classes defined in our meta-model Translates into Abstract model of CompositeŒ Let’s take an example. From the description and the OMT diagram proposed by the GoF for the Composite pattern. We extract all the needed information and we formalize the design pattern using our meta-model. Here you can see the Composite pattern abstract model, where each entities and elements are instances of constituents of our meta-model. We call this an abstract model because it represents the design pattern solution, independently of any context, specific cardinality, and so on.
  • 13. 13 Abstract model n Each constituent of the meta-model deliver its associated code – New language are added using an instance of the Visitor design pattern – Modifications of an existing source code is (only) provided for Java using JavaXL n Each constituent of the meta-model detect its associated instances Œ An abstract model is a first-class entity in our system. It know how to generate the source code associated with itself. It know how to detect its own instances in source code.
  • 14. 14 Abstract model Composite pattern abstract model Composite pattern concrete model 1 Composite pattern concrete model n PatternsBox • • • Composite pattern concrete model 1 (source code) Composite pattern concrete model n (source code) •• ‚‚ Ptidej ‚ ‚ ‚ Œ To understand fully what is an abstract model, consider the following example. We developed two tools, I will present these tools more in details later (if we have some time left ;-). From the Composite design pattern abstract model, PatternsBox allows us “to concretize” this abstract model. This means that we can specify role names, cardinalities... This is basically like a parameterization of the abstract model. The results are, for instance, two concrete models: •One representing a dummy example (on the left). •One representing a sub-set of the Java AWT hierarchy (on the right). From these concrete models, we can generate the corresponding source code. Now, we have this second tool, Ptidej, which from the source code (any source code), builds back concrete models of a given design pattern abstract model.
  • 15. 15 • n We need a way to apply physically design patterns – At the source code level – With as few modifications as possible The second point deals with the application of a design pattern in a given source code. Because we want to help the developers and the maintainers to use design patterns, we must apply design patterns at the source code level (level where the developers and maintainers work) while modifying the source code as little as possible.
  • 16. 16 JavaXL n Extension to the Java reflection APIs n Working at the source code level n Modifying the user source code as little as possible n Modifications are reversible • We developed an extension of the Java reflection APIs. This extension works at the source code level, to the contrary of already existing extensions, such as Javassit or OpenJava. The modifications are minimal and reversible.
  • 17. 17 JavaXL n High-level abstraction – Multiple language – No semantics n High-level interface – Specific Java implementation to VAJ – Refactorings (Eclipse, Grant Gayed) • Basically, JavaXL defines high-level abstractions, that are language independent and that provide no semantic checks. JavaXL is also a high-level interface that hides implementation details. So far, we have a Java-specific implementation, closely related to VAJ. But we can imagine to have a version working on top of refactorings, such as the one implemented in Eclipse or using XML and the mechanisms proposed by Grant Gayed.
  • 18. 18 Singleton n Example of the Singleton pattern for (Iterator i = aClass.getConstructors().iterator(); i.hasNext();) { XMethod currentMethod = (XMethod) i.next(); currentMethod.setModifiers(Modifier.PRIVATE); } XField xf = new XField(); xf.setModifiers(Modifier.STATIC & Modifier.PRIVATE); xf.setName("soleInstance"); … Basic A Example:• Here is a basic example of JavaXL in action. This is an extract from the transformation needed to apply the Singleton pattern. In the loop, for each constructor of the class represented by aClass, we create an instance of XMethod and we modify its modifiers. Then, we create an instance of XField, set its modifiers to static-private, then we name this field “soleInstance” and so on…
  • 19. 19 Ž n We need a way to detect physically design patterns – Use of a design pattern solution • Well written code • Notion of complete version – Other uses of a design pattern solution • Code improvement • Notion of proximal version + No up-front descriptions of the variations The third and last point concerns the detection of design patterns. What is important to notice, is that design patterns are never applied “by the rules”, there are always adapted and modified. We need a mechanism able to detect the use of design pattern solutions is well-written code, that is the notion of complete solutions. And a mechanism able to detect the variations of a design pattern solutions in to- be-improved code, that is the notion proximal solutions.
  • 20. 20 Complete and proximal versions n Related works – The search of sub-graphs in a graph – The adaptation phase in case-based reasoning – Logic programming ÆExplanation-based constraint programming (e-Constraints) Ž There are several related work, although none is specifically oriented towards the detection of the complete and proximal solutions. What is important, is that we do not want to describe a priori the variations. We do not want / we cannot think about all the variations beforehand. Thus, we need: •Explanations for why there is or not solutions. •A way to know why a solution is a solution. •A way to look for more solutions. •A strong user interaction. All these requirements led us to look at explanation-based constraint programming, a.k.a. e-Constraints.
  • 21. 21 e-Constraints n Set of constraints justifying an action performed by the solver –Value removal –Contradiction n Trace of the solver behaviour Ž An explanation is a set of constraints that justify an action performed by the solver (value removals, contradiction...) Explanations are computed by tracing the behaviour of the solver.
  • 22. 22 e-Constraints n An implementation: PaLM –Developed by Narendra Jussien, on top of Choco, written in Claire –Used for • Path-Repair • Mac-DBT • Assistance upon failure • Interactive solvers Ž We have an implementation of e-Constraints: the PaLM system, which uses Choco and Claire. The PaLM system is developed by Narendra Jussien at the École des Mines. This system has been used (its explanations) to: •Provide assistance upon failure (debugging tools). •Design interactive solvers (dynamic addition and removal of constraints). •Design new search algorithm (guided by the explanations). It is a reliable and efficient implementation of e-Constraints.
  • 23. 23 Our application n The design pattern abstract model – A class defines a variable – Relationships among classes define constraints n The source code of the application – The classes define the domain of the variables – Relationships among classes give the semantics of the constraints Ž In our application of e-Constraints. We define a CSP using a design pattern abstract model and the given source code. From the design pattern abstract model: •A class defines a variable •Relationships among classes define constraints From the source code of the application: •The classes define the domain of the variables •Relationships among classes give the semantics of the constraints
  • 24. 24 Our application n e-Constraints enables – Complete and proximal versions – Justifications • Explain why / how a solution is a solution • Explain why / how the code is modified – Strong interactivity with the user • Dynamic description of the variations Ž Programming is an artistic activity, in the sense that there are no good designs but best designs depending on the context (expected life time, cost, experience of the developer…). We need the justification provided by e-Constraints to explain why and how a solution is solution, thus why and how the code is to be modified. A complete solution = A solution with all the constraints. A proximal solution = A solution with some constraints removed. The idea is to associate a reason for a constraint to be there. This reason may be textual, but it may also contain executable code, written in terms of JavaXL, to provide the transformations needed to correct the code. We need to interact heavily with the developer: We cannot / do not want to think about all the possible cases!
  • 25. 25 n The Composite design pattern solution n Its constraints ConstraintsBasic A Example: composite < component leaf < component composite ⊃ component Ž For example, if we take the Composite design pattern abstract model. The constraint associated with this model are … These constraints are automatically generated by the abstract model, we come back to the point that we want a common description of design pattern tailored for application and generation. (Beware of the < symbol which is different from the object-oriented way of thinking.)
  • 26. 26 InteractionBasic A Example: composite < component leaf < component composite ⊃ component Ž From the constraints, and given a source code, the e-Constraints PaLM system allow us to find all the complete solutions; and, to find all the proximal solutions (or at least, the ones we are interested in) by removing or adding constraint dynamically. Of course, we can potentially explore an exponential universe, but it does not matter because the user directs the search and stops it when she judges that it does not make sense to remove constraints further.
  • 27. 27 n We needed – A common description for design patterns • Application viewpoint • Detection viewpoint – A way to apply physically design patterns – A way to detect physically design patterns Œ + • + Ž = PatternsBox + Ptidej Basic A Example Œ • Ž
  • 28. 28 Application n PatternsBox is a tool to instantiate design patterns from a repository of patterns Basic A Example:
  • 29. 29 Application n From the pattern, we access the pattern description Basic A Example:
  • 30. 30 Application n We adapt actors and roles to the current context Basic A Example:
  • 31. 31 Application n The tool generates the code required for the design pattern in Java public interface MyComponent { public abstract void myOperation(); } public class MyComposite implements MyComponent { // Association: myChildren private java.util.Vector myChildren = new java.util.Vector(); public void add (MyComponent myComponent) { myChildren.addElement(myComponent); } public void remove (MyComponent myComponent) { myChildren.removeElement(myComponent); } // Method linked to: myChildren public void myOperation() { for (Enumeration enum = myChildren.elements(); enum.hasMoreElements(); ((MyComponent) enum.nextElement()).myOperation()); } } public class MyLeaf implements MyComponent { public void myOperation() { } } Basic A Example:
  • 32. 32 Detection n Ptidej detects instances of an abstract model Basic A Example:
  • 33. 33 Detection n It generates a CSP from the design Basic A Example:
  • 35. 35 Detection n It highlights design patterns Basic A Example:
  • 36. 36 Detection n It shows the differences Basic A Example:
  • 37. 37 Correction n It applies the source transformations Basic A Example:
  • 38. 38 Back to the future n Design pattern, design defects = dual problems – Meta-model, abstract model – Source-to-source transformation engine – e-Constraints n Two tools Œ + • + Ž = PatternsBox + Ptidej = Round-trip So, in this (long ;-) presentation, I talked about software quality, and how it is related to design defects, and how those are related to design patterns. Then, I presented a meta-model to express design patterns. This meta- model is tailored towards detection and application. I introduced the concepts of abstract and concrete models. Then, I presented JavaXL. JavaXL is an extension to the Java reflection API. We use JavaXL to modify the source code. These modifications are as small as possible. And, then, I presented a new paradigm of constraint programming, explanation-based constraint programming, a.k.a. e-Constraints. We use e- Constraints to detect complete and proximal versions of a design pattern. Finally, I briefly show two tools, PatternsBox and Ptidej, implementing our ideas.
  • 39. 39 Future n Meta-model, abstract models – [Gamma et al. 1994] design patterns – Design defects n Source-to-source transformation engine – Refactorings n e-Constraints – Interaction – Previous solutions as knowledge First, we would like to improve the meta-model and develop design patterns and design defects abstract models. Second, we will enhance the source-to-source transformation engine, to integrate it with refactorings, either to use refactorings or to develop refactorings with it. Finally, we will improve the interaction and the automation of the constraint system. And we are investigating the use of previous solutions as knowledge to help the developers in their choices.
  • 40. 40 Future And, of course, because the future is already there, we are integrating our tools with Eclipse! Ptidej, the detection tool, is already half-done. PatternsBox, JavaXL should come out soon… Thank you very much for your attention. If you have any question or comment, please feel free to ask. If you want a demo, feel free to ask! You may also contact us at: •cointe@emn.fr (Team leader ;-) •jussien@emn.fr (e-Constraints, www.e-constraints.net) •albin@emn.fr (Application, JavaXL, PatternsBox, www.emn.fr/albin) •guehene@emn.fr (Detection, Ptidej, Eclipse, www.yann- gael.gueheneuc.net/Work/)