SlideShare a Scribd company logo
OBJECT-ORIENTED

DESIGN HEURISTICS
LINGI2252 – PROF. KIM MENS
* These slides are part of the course LINGI2252 “Software Maintenance and Evolution”,
given by Prof. Kim Mens at UCL, Belgium
*
OBJECT-ORIENTED DESIGN HEURISTICS
OBJECT-ORIENTED DESIGN HEURISTICS
Arthur J. Riel

Object-Oriented Design Heuristics

© Addison-Wesley, 1996.


Other sources:
A presentation by Prof. Kenneth M. Anderson, University of Colorado
Boulder, on OO Design Heuristics (April 2002)
A presentation by Prof. Harald Gall, University of Zurich, on OO
Design Heuristics (2006)
A blog by Marc Hoeijmans on Riel’s design heuristics (June 2012)
OBJECT-ORIENTED DESIGN HEURISTICS
WHEN IS A SYSTEM IS WELL-DESIGNED?
How to know if the OO design of your system is good / bad / in between?
If you ask an OO guru : “a design is good when it feels right”
How to know when it feels right?
Subconsciously, a guru runs through a list of design heuristics
built up through previous design experience.
If the heuristics pass, then the design feels right.
If they do not pass, the design does not feel right.
Riel’s book tries to make these heuristics explicit.
3
OBJECT-ORIENTED DESIGN HEURISTICS
OBJECT-ORIENTED DESIGN HEURISTICS
Arthur J. Riel

Object-Oriented Design Heuristics

© Addison-Wesley, 1996.
~60 language-independent guidelines
Offering insights into OO design improvement
No hard rules, only heuristics : can be ignored when not relevant
Targeted to programmers to improve their OO programming and design skills
Based on Riel’s experience as CS teacher and OO A&D consultant
OBJECT-ORIENTED DESIGN HEURISTICS
CATEGORIES OF OO DESIGN HEURISTICS
A. Classes and Objects
B. Topology of Procedural vs. Object-Oriented Applications
C. Relationships Between Classes and Objects
D. The Inheritance Relationship
E. Multiple Inheritance
Other Categories:
F. Association Relationship
G. Class-Specific Data and Behaviour
H. Physical object-oriented design
5
OBJECT-ORIENTED DESIGN HEURISTICS
A WORD OF WARNING…
Not all heuristics work together perfectly.
Some may even be directly opposed !
There are always trade-offs to be made in analysis and design.
E.g., a change to reduce complexity may reduce flexibility.
You have to decide which heuristic makes most sense for
your particular context.
Heuristics are not “golden” rules that always work.
6
OBJECT-ORIENTED DESIGN HEURISTICS
A. CLASSES AND OBJECTS
The Building Blocks of the Object Oriented Paradigm
7
OBJECT-ORIENTED DESIGN HEURISTICS
HIDING DATA
Heuristic A.1
All data should be hidden within its class.

8
When developers say :
“I need to make this piece of data public because...”
They should ask themselves :
“What is it that I’m trying to do with this data and why cannot the class
perform that operation for me?”
Does it really have to be exposed to others?
Does this piece of data really belong in this class?
OBJECT-ORIENTED DESIGN HEURISTICS
NO DEPENDENCE ON CLIENTS
Heuristic A.2
Users of a class must be dependent on its public interface,
but a class should not be dependent on its users.
9
Why?
OBJECT-ORIENTED DESIGN HEURISTICS
NO DEPENDENCE ON CLIENTS
Heuristic A.2
Users of a class must be dependent on its public interface,
but a class should not be dependent on its users.
Why? Reusability !
10
For example, a person can make use of
an alarm clock, but the alarm clock
shouldn’t know about the person.

Otherwise the alarm clock couldn’t be
reused for other persons.
A PERSON
NAME: BOB
JONES
AGE: 31
SSN: 037439087
TEL: 991-4671
AN ALARM CLOCK
HOUR: 12

MINUTE: 34

ALARM HOUR: 6
ALARM MINUTE: 0
ALMR STATUS: ON
OBJECT-ORIENTED DESIGN HEURISTICS
ONE CLASS = ONE RESPONSIBILITY
Heuristic A.8
A class should capture one and only one key abstraction.
11
A class should be cohesive.

Try to have one clear responsibility per class.

OBJECT-ORIENTED DESIGN HEURISTICS
SMALL CLASSES
Heuristic A.3
Minimise the number of messages in the protocol of a class.
(protocol of a class means the set of messages to which an instance of
the class can respond)

Keep it small.
The problem with large public interfaces is that you can never find what
you are looking for.
A smaller public interface make a class easier to understand and modify.
12
OBJECT-ORIENTED DESIGN HEURISTICS
SUPPORTING POLYMORPHISM AND COMMUNICATION
Heuristic A.4
Implement a minimal public interface that all classes understand.
E.g., operations such as copy (deep versus shallow), equality
testing, pretty printing, parsing from a ASCII description, etc.

Why?
To be able to send the same message to different objects.
To be able to substitute them.
13
OBJECT-ORIENTED DESIGN HEURISTICS
CLEAR PUBLIC INTERFACE
Keep it clean: Users of a class do not want to see operations in the public
interface that they are not supposed to use, cannot use, or are not
interested in using.

Heuristic A.5
Do not put implementation details such as common-code private
functions into the public interface of a class.
Heuristic A.6
Do not clutter the public interface of a class with items that clients are
not able to use or are not interested in using.
14
OBJECT-ORIENTED DESIGN HEURISTICS
MINIMISE CLASSES INTERDEPENDENCIES
Strive for loose coupling !

Heuristic A.7
A class should only use operations in the public interface
of another class or have nothing to do with that class.
15
OBJECT-ORIENTED DESIGN HEURISTICS
STRENGTHEN ENCAPSULATION
A class should be cohesive. Move data close to behaviour.
Heuristic A.9
Keep related data and behaviour in one place.
(Similar to the “Move Method” refactoring pattern.)
Heuristic A.10
Spin off non-related information into another class.
(Similar to the “Extract Class” refactoring pattern.)
16
OBJECT-ORIENTED DESIGN HEURISTICS
ROLES VS. CLASSES
Heuristic A.11
Be sure the abstractions that you model are classes and not
simply the roles objects play.
Are mother and father different classes or rather roles of Person?
No magic answer: depends on the domain.
Do they have different behaviour? If so, then they are more likely
to be distinct classes.
17
OBJECT-ORIENTED DESIGN HEURISTICS
B. TOPOLOGIES OF PROCEDURAL VS. OO APPLICATIONS
This category of heuristics is about the use of non-OO structures in OO
applications.
Procedural topologies break an application down to functions sharing data
structures.
In such a topology it is easy to see which functions access which data
structures,
but difficult to see which data structures are used by which functions.
Changing a data structure may have unintended consequences on the
functions using it.
Object-oriented topologies try to keep the data closer to the behaviour.
18
OBJECT-ORIENTED DESIGN HEURISTICS
TYPICAL PROBLEMS
Two typical problems that arise when developers familiar with
procedural techniques try to create an OO design:
The God Class
A single class that drives the application;

all other classes are data holders.
Proliferation of Classes
Problems with modularisation taken too far.
Too many classes that are too small in size/scope make the system
hard to use, debug and maintain.
19
OBJECT-ORIENTED DESIGN HEURISTICS
AVOID CREATING GOD CLASSES
Do not create God classes that control all other classes.
Heuristic B.12
Distribute system intelligence horizontally as uniformly as possible,
that is the top level classes in a design should share the work
uniformly.
Heuristic B.13
Do not create god classes or god objects in your system.
Be very suspicious of classes whose name contains DRIVER,
MANAGER, SYSTEM, SUBSYSTEM, etc.
20
OBJECT-ORIENTED DESIGN HEURISTICS
BASIC CHECKS FOR GOD CLASS DETECTION
Heuristic B.14
Beware of classes that have many accessor methods defined in their
interface.
This may imply that related data and behaviour are not being kept in
the same place.
Heuristic B.15
Beware of classes that have too much non-communicating behaviour, that
is, methods that only operate on a proper subset of their data members.
God classes often exhibit a great deal of non-communicating behaviour.
21
OBJECT-ORIENTED DESIGN HEURISTICS
AVOID CLASS PROLIFERATION
Heuristic B.18
Eliminate irrelevant classes from your design.
Irrelevant classes often only have get, set, and print methods.
Heuristic B.19
Eliminate classes that are outside the system.
Principle of domain relevance.
Heuristic B.20
Do not turn an operation into a class.
Be suspicious of any class whose name is a verb or is derived from a verb, especially those
which have only one piece of meaningful behaviour.
Ask yourself if that piece of meaningful behaviour needs to be migrated to some existing or
undiscovered class.
OBJECT-ORIENTED DESIGN HEURISTICS
HOW TO MODEL AN OBJECT-0RIENTED APPLICATION?
Heuristic B.17
Model the real world whenever possible.
(This heuristic is often violated for reasons of system intelligence
distribution, avoidance of god classes, and the keeping of related data and
behaviour in one place.)
What if you want two different UIs for the same model?
Heuristic B.16
In applications that consist of an object oriented model interacting with a
user interface, the model should never be dependent on the interface. The
interface should be dependent on the model.
23
OBJECT-ORIENTED DESIGN HEURISTICS
C. RELATIONSHIPS BETWEEN CLASSES AND OBJECTS
As a general guideline :
High cohesion inside classes and objects
Loose coupling between classes and objects
24
OBJECT-ORIENTED DESIGN HEURISTICS
MINIMIZING COUPLING BETWEEN CLASSES
Heuristic C.22
Minimize the number of classes with which another class
collaborates.
Look for situations where one class communicates with a group of
classes.
Ask if it is possible to replace the group by a class that contains
the group.

STRIVE FOR

LOOSE COUPLING !
25
OBJECT-ORIENTED DESIGN HEURISTICS
MINIMIZING COUPLING BETWEEN CLASSES
Related heuristics :

Heuristic C.23 : Minimize the number of message sends between a class and its
collaborator.
(Counter example: Visitor design pattern)

Heuristic C.24 : Minimize the amount of collaboration between a class and its
collaborator, that is, the number of different messages sent.

Heuristic C.25 : Minimize fanout in a class, that is the product of the number of
messages defined by the class and the messages they send.
STRIVE FOR

LOOSE COUPLING !
26
OBJECT-ORIENTED DESIGN HEURISTICS
ABOUT THE USE RELATIONSHIP
When an object “uses” another one it should get a reference to it
in order to interact with it
Ways to get references :
(containment) contains instance variables of the class of the
other object
the other object is passed as argument
asked to a third party object (mapping…)
instance creation of the other object and then interact with it
27
OBJECT-ORIENTED DESIGN HEURISTICS
CONTAINMENT AND USES
Heuristic C.26
If a class contains objects of another class, then the containing class
should be sending messages to the contained objects
that is, the containment relationship should always imply a “uses”
relationship.
Heuristic C.34
A class must know what it contains, but should never know who
contains it.
(Do not depend on your users.)
28
OBJECT-ORIENTED DESIGN HEURISTICS
COHERENCE IN CLASSES
Heuristic C.27 :
Most of the methods defined on a class should be using most of the data members most
of the time.
A class should be cohesive.

Heuristic C.28 :
Classes should not contain more objects than a developer can fit in his or her short-term
memory. A favourite value for this number is six (or seven).

Heuristic C.29 :
Distribute system intelligence vertically down narrow and deep containment hierarchies.
29
STRIVE FOR

HIGH COHESION !
OBJECT-ORIENTED DESIGN HEURISTICS
D. THE INHERITANCE RELATIONSHIP
30
OBJECT-ORIENTED DESIGN HEURISTICS
INHERITANCE DEPTH
Heuristic D.39
In theory, inheritance hierarchies should be deep - the
deeper the better
Heuristic D.40
In practice, however, inheritance hierarchies should be no
deeper than an average person can keep in his or her
short term memory. A popular value for this is six.
31
OBJECT-ORIENTED DESIGN HEURISTICS
ABSTRACT CLASSES = BASE CLASSES
Heuristic D.41.
All abstract classes must be base classes.
Heuristic D.42 :
All base classes must be abstract classes.
Base class = class with at least one subclass
Abstract class = class with at least one abstract method
These heuristics are controversial !
32
OBJECT-ORIENTED DESIGN HEURISTICS
ABSTRACT CLASSES = BASE CLASSES : CONTROVERSIAL !
Heuristic D.41 : All abstract classes must be base classes.
Intuition : why make a method abstract if you won’t concretise it in a subclass?
Counter-example : application frameworks
Heuristic D.42 : All base classes must be abstract classes.
Intuition : methods overridden in the subclasses should be abstract in the
superclass
Not necessarily true :
they can have a default behaviour or value in the superclass;
the subclass may add only new methods
33
OBJECT-ORIENTED DESIGN HEURISTICS
BASE CLASSES IN INHERITANCE HIERARCHIES
Heuristic D.37
Derived classes must have knowledge of their base class by definition, but base
classes should not know anything about their derived classes.
A superclass should not know its subclasses.
Heuristic D.38
All data in a base class should be private; do not use protected data.
Subclasses should not use directly data of superclasses.
Heuristic D.51
It should be illegal for a derived class to override a base class method with a NOP
method, that is, a method that does nothing.
34
OBJECT-ORIENTED DESIGN HEURISTICS
COMMONALITIES IN INHERITANCE HIERARCHIES
Heuristic D.43
Factor the commonality of data, behaviour, and/or interface, as
high as possible in the inheritance hierarchy.
Heuristic D.45
If two or more classes have common data (variables) and
behaviour (that is, methods), then those classes should each
inherit from a common base class that captures those data and
methods.
35
OBJECT-ORIENTED DESIGN HEURISTICS
COMMONALITIES IN INHERITANCE HIERARCHIES
Heuristic D.44
If two or more classes share only common data (no common
behaviour), then that common data should be placed in a
class that will be contained by each sharing class.
Heuristic D.44.bis
If two or more classes share only common interface (i.e.
messages, not methods) then they should inherit from a
common base class only if they will be used polymorphically.
OBJECT-ORIENTED DESIGN HEURISTICS
AVOID TYPE CHECKS (ESSENTIAL !)
Heuristic D.46
Explicit case analysis on the type of an object is usually an error.
or at least bad design : the designer should use
polymorphism instead in most of these cases
indeed, an object should be responsible of deciding how to
answer to a message
a client should just send messages and not discriminate
messages sent based on receiver type
37
OBJECT-ORIENTED DESIGN HEURISTICS
AVOID CASE CHECKS
Heuristic D.47
Explicit case analysis on the value of an attribute is often
an error.
The class should be decomposed into an inheritance
hierarchy, where each value of the attribute is
transformed into a derived class.
38
OBJECT-ORIENTED DESIGN HEURISTICS
INHERITANCE = SPECIALISATION
Heuristic D.36
Inheritance should be used only to model a specialisation hierarchy.
Do not confuse inheritance and containment.
Containment is black-box.

Inheritance is white-box.
Heuristic D.52
Do not confuse optional containment with the need for inheritance.
Modelling optional containment with inheritance will lead to a
proliferation of classes.
39
OBJECT-ORIENTED DESIGN HEURISTICS
DYNAMIC SEMANTICS
Heuristic D.48
Do not model the dynamic semantics of a class through the use of an inheritance
relationship.
An attempt to model dynamic semantics with a static semantic relationship will lead to a
toggling of types at run time.
Heuristic D.49
Do not turn objects of a class into derived classes of the class.
Be very suspicious of any derived class for which there is only one instance.
Heuristic D.50
If you think you need to create new classes at run time, take a step back and realise that
what you are trying to create are objects. Now generalise these objects into a new class.
40
OBJECT-ORIENTED DESIGN HEURISTICS
FRAMEWORKS
Heuristic D.53
When building an inheritance hierarchy, try to construct
reusable frameworks rather than reusable components.
41
OBJECT-ORIENTED DESIGN HEURISTICS
E. MULTIPLE INHERITANCE
42
OBJECT-ORIENTED DESIGN HEURISTICS
PROVE MULTIPLE INHERITANCE
Avoid using multiple inheritance when possible. (It’s too easy to
misuse it).

Heuristic E.54
If you have an example of multiple inheritance in your design,
assume you have made a mistake and then prove otherwise.


Most common mistake: Using multiple inheritance in place of
containment
43
OBJECT-ORIENTED DESIGN HEURISTICS
QUESTION IT
Heuristic E.55
Whenever there is inheritance in an OO design, ask yourself two questions:
(a) Am I a special type of the thing from which I am inheriting?
(b) Is the thing from which I am inheriting part of me?
A yes to (a) and no to (b) would imply the need for inheritance.
A no to (a) and a yes to (b) would imply the need for composition instead?
– Is an airplane a special type of fuselage? No (the fuselage is the body of an airplane)
– Is a fuselage part of an airplane? Yes
44
OBJECT-ORIENTED DESIGN HEURISTICS
QUESTION IT
Heuristic E.56
Whenever you have found a multiple inheritance relationship in an OO
design, be sure that no base class is actually a derived class of another
base class.
i.e. accidental multiple inheritance.
45
OBJECT-ORIENTED DESIGN HEURISTICS
MULTIPLE INHERITANCE
So, is there a valid use of multiple
inheritance?
Yes, subtyping for combination
When defining a new class that is a special
type of two other classes and those two
base classes are from different domains
WOODEN
OBJECT
DOOR
WOODEN

DOOR
46
OBJECT-ORIENTED DESIGN HEURISTICS
MULTIPLE INHERITANCE
Is a wooden door a special type of door? Yes

Is a door part of a wooden door? No



Is a wooden door a special type of wooden object? Yes

Is a wooden object part of a door? No


Is a wooden object a special type of door? No

Is a door a special type of wooden object? No
All Heuristics Pass!
WOODEN
OBJECT
DOOR
WOODEN

DOOR
47
OBJECT-ORIENTED DESIGN HEURISTICS
OTHER CATEGORIES OF OBJECT-ORIENTED DESIGN HEURISTICS
F. The Association Relationship
G. Class-Specific Data and Behaviour
H. Physical object-oriented design
48
OBJECT-ORIENTED DESIGN HEURISTICS
F. THE ASSOCIATION RELATIONSHIP
Heuristic F.57 : Containment or Association?
When given a choice in an OO design between a
containment and association, choose the containment
relationship.
49
OBJECT-ORIENTED DESIGN HEURISTICS
G. CLASS-SPECIFIC DATA AND BEHAVIOUR
Heuristic G.58 : No global bookkeeping
Do not use global data or functions to perform
bookkeeping information on the objects of a class. Class
variables or methods should be used instead.
50
OBJECT-ORIENTED DESIGN HEURISTICS
H. PHYSICAL OBJECT-ORIENTED DESIGN
Heuristic H.59
OO designers should not allow physical design criteria to
corrupt their logical designs. However, physical design
criteria often are used in the decision-making process at
logical design time.
Heuristic H.60
Do not change the state of an object without going through
its public interface.
51
Object-Oriented Design Heuristics
OBJECT-ORIENTED DESIGN HEURISTICS
SUMMARY
Use the guidelines for :
insightful analysis
critical reviews
as guide for better OO design
to build reusable components and frameworks
OBJECT-ORIENTED DESIGN HEURISTICS
POSSIBLE QUESTIONS
▸ Give and explain at least 2 design heuristics about the relation between a subclass and its
superclass.
▸ Discuss the design heuristics which state that “All abstract classes must be base classes” and
“All base classes should be abstract classes”. Do you agree with these heuristics? Under what
conditions?
▸ Several design heuristics are related to the need for high cohesion. Discuss 2 such heuristics
and their relation with cohesion.
▸ Several design heuristics are related to the need for loose coupling. Discuss 2 such heuristics
and their relation with coupling.
▸ Discuss the following design heuristic “Explicit case analysis on the type of an object is usually
an error.”
▸ Give a concrete example of and discuss when multiple inheritance would be a valid design
solution.
Ad

More Related Content

What's hot (20)

Implementing Domain Events with Kafka
Implementing Domain Events with KafkaImplementing Domain Events with Kafka
Implementing Domain Events with Kafka
Andrei Rugina
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Young-Ho Cho
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Nader Albert
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
Frederik Mogensen
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
Clean architecture
Clean architectureClean architecture
Clean architecture
andbed
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
Containerization
ContainerizationContainerization
Containerization
Gowtham Ventrapati
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
Oğuzhan Soykan
 
Docker
DockerDocker
Docker
A.K.M. Ahsrafuzzaman
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
Alexander van Trijffel
 
Container Orchestration using Kubernetes
Container Orchestration using KubernetesContainer Orchestration using Kubernetes
Container Orchestration using Kubernetes
Hesham Amin
 
Domain Driven Design
Domain Driven Design Domain Driven Design
Domain Driven Design
Araf Karsh Hamid
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
Andriy Buday
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
Paulo Gandra de Sousa
 
Domain Driven Design 101
Domain Driven Design 101Domain Driven Design 101
Domain Driven Design 101
Richard Dingwall
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 
Domain driven design
Domain driven designDomain driven design
Domain driven design
Mustafa Dağdelen
 
Implementing Domain Events with Kafka
Implementing Domain Events with KafkaImplementing Domain Events with Kafka
Implementing Domain Events with Kafka
Andrei Rugina
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Young-Ho Cho
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Nader Albert
 
Clean architecture
Clean architectureClean architecture
Clean architecture
andbed
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
Docker, Inc.
 
Introduction to Docker - VIT Campus
Introduction to Docker - VIT CampusIntroduction to Docker - VIT Campus
Introduction to Docker - VIT Campus
Ajeet Singh Raina
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
Imesh Gunaratne
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
Oğuzhan Soykan
 
Applying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain ModelsApplying Domain-Driven Design to craft Rich Domain Models
Applying Domain-Driven Design to craft Rich Domain Models
Alexander van Trijffel
 
Container Orchestration using Kubernetes
Container Orchestration using KubernetesContainer Orchestration using Kubernetes
Container Orchestration using Kubernetes
Hesham Amin
 
Domain-Driven Design
Domain-Driven DesignDomain-Driven Design
Domain-Driven Design
Andriy Buday
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
Sneha Inguva
 

Viewers also liked (13)

Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
PerconaPerformance
 
Salt Lake City 2013 - Presentation
Salt Lake City 2013 - PresentationSalt Lake City 2013 - Presentation
Salt Lake City 2013 - Presentation
Jiří Douša George.Dousa
 
Neuro linguistic programming
Neuro linguistic programmingNeuro linguistic programming
Neuro linguistic programming
Niharika Thakkar
 
What is DBT?
What is DBT?What is DBT?
What is DBT?
dbtonline
 
Learning Nlp
Learning NlpLearning Nlp
Learning Nlp
Mike Hill
 
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
Hafiz Ammar Siddiqui
 
13 nlp presuppositions
13 nlp presuppositions13 nlp presuppositions
13 nlp presuppositions
AshLawrence
 
Object? You Keep Using that Word
Object? You Keep Using that WordObject? You Keep Using that Word
Object? You Keep Using that Word
Kevlin Henney
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
Slideshare
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our Ways
Kevlin Henney
 
User centred design (UCD) and the connected home
User centred design (UCD) and the connected homeUser centred design (UCD) and the connected home
User centred design (UCD) and the connected home
Cyber-Duck
 
Neuro Linguistic Programming
Neuro Linguistic ProgrammingNeuro Linguistic Programming
Neuro Linguistic Programming
smjk
 
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explained
Craft Design
 
Object Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And ApplicationsObject Oriented Css For High Performance Websites And Applications
Object Oriented Css For High Performance Websites And Applications
PerconaPerformance
 
Neuro linguistic programming
Neuro linguistic programmingNeuro linguistic programming
Neuro linguistic programming
Niharika Thakkar
 
What is DBT?
What is DBT?What is DBT?
What is DBT?
dbtonline
 
Learning Nlp
Learning NlpLearning Nlp
Learning Nlp
Mike Hill
 
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
4-Object Oriented Design Heuristics (Object Oriented Software Engineering - B...
Hafiz Ammar Siddiqui
 
13 nlp presuppositions
13 nlp presuppositions13 nlp presuppositions
13 nlp presuppositions
AshLawrence
 
Object? You Keep Using that Word
Object? You Keep Using that WordObject? You Keep Using that Word
Object? You Keep Using that Word
Kevlin Henney
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
Slideshare
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our Ways
Kevlin Henney
 
User centred design (UCD) and the connected home
User centred design (UCD) and the connected homeUser centred design (UCD) and the connected home
User centred design (UCD) and the connected home
Cyber-Duck
 
Neuro Linguistic Programming
Neuro Linguistic ProgrammingNeuro Linguistic Programming
Neuro Linguistic Programming
smjk
 
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explained
Craft Design
 
Ad

Similar to Object-Oriented Design Heuristics (20)

Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven Design
Harsh Jegadeesan
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
Amit Kabra
 
Intelligent Tutorial Systems
Intelligent Tutorial SystemsIntelligent Tutorial Systems
Intelligent Tutorial Systems
Martin Homik
 
PMSE pdf
PMSE pdfPMSE pdf
PMSE pdf
ADARSHN40
 
Introaied nancy2019 luengo
Introaied nancy2019 luengoIntroaied nancy2019 luengo
Introaied nancy2019 luengo
Vanda Luengo
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
Sanae BEKKAR
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilities
guest2a92cd9
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
DrYogeshDeshmukh1
 
testtesttest
testtesttesttesttesttest
testtesttest
Marissa Montgomery
 
EdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper AwardEdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper Award
Alan Amory
 
Unit iii design patterns 9
Unit iii design patterns 9Unit iii design patterns 9
Unit iii design patterns 9
kiruthikamurugesan2628
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
fridolin.wild
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design Patterns
Michael Heron
 
Designing and using group software through patterns
Designing and using group software through patternsDesigning and using group software through patterns
Designing and using group software through patterns
Kyle Mathews
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
Milos Kravcik
 
Designing for TEL - Design-based research.pptx
Designing for TEL -  Design-based research.pptxDesigning for TEL -  Design-based research.pptx
Designing for TEL - Design-based research.pptx
Maha Al-Freih
 
3 D Project Based Learning Basics for the New Generation Science Standards
3 D Project Based  Learning Basics for the New Generation Science Standards3 D Project Based  Learning Basics for the New Generation Science Standards
3 D Project Based Learning Basics for the New Generation Science Standards
rekharajaseran
 
CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV
pkaviya
 
Grasp
GraspGrasp
Grasp
Fizza Durrani
 
Sicilia-Aera08
Sicilia-Aera08Sicilia-Aera08
Sicilia-Aera08
Miguel-Angel Sicilia
 
Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven Design
Harsh Jegadeesan
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
Amit Kabra
 
Intelligent Tutorial Systems
Intelligent Tutorial SystemsIntelligent Tutorial Systems
Intelligent Tutorial Systems
Martin Homik
 
Introaied nancy2019 luengo
Introaied nancy2019 luengoIntroaied nancy2019 luengo
Introaied nancy2019 luengo
Vanda Luengo
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
Sanae BEKKAR
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilities
guest2a92cd9
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
DrYogeshDeshmukh1
 
EdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper AwardEdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper Award
Alan Amory
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
fridolin.wild
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design Patterns
Michael Heron
 
Designing and using group software through patterns
Designing and using group software through patternsDesigning and using group software through patterns
Designing and using group software through patterns
Kyle Mathews
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
Milos Kravcik
 
Designing for TEL - Design-based research.pptx
Designing for TEL -  Design-based research.pptxDesigning for TEL -  Design-based research.pptx
Designing for TEL - Design-based research.pptx
Maha Al-Freih
 
3 D Project Based Learning Basics for the New Generation Science Standards
3 D Project Based  Learning Basics for the New Generation Science Standards3 D Project Based  Learning Basics for the New Generation Science Standards
3 D Project Based Learning Basics for the New Generation Science Standards
rekharajaseran
 
CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV CS8592 Object Oriented Analysis & Design - UNIT IV
CS8592 Object Oriented Analysis & Design - UNIT IV
pkaviya
 
Ad

More from kim.mens (20)

Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolution
kim.mens
 
Context-Oriented Programming
Context-Oriented ProgrammingContext-Oriented Programming
Context-Oriented Programming
kim.mens
 
Software Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented ProgrammingSoftware Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented Programming
kim.mens
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
kim.mens
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
kim.mens
 
Code Refactoring
Code RefactoringCode Refactoring
Code Refactoring
kim.mens
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modelling
kim.mens
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
kim.mens
 
Towards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation FrameworkTowards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation Framework
kim.mens
 
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty ApproachesTowards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
kim.mens
 
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software EngineeringBreaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
kim.mens
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programming
kim.mens
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflection
kim.mens
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
kim.mens
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
kim.mens
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Ruby
kim.mens
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
kim.mens
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalk
kim.mens
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflection
kim.mens
 
Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...
kim.mens
 
Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolution
kim.mens
 
Context-Oriented Programming
Context-Oriented ProgrammingContext-Oriented Programming
Context-Oriented Programming
kim.mens
 
Software Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented ProgrammingSoftware Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented Programming
kim.mens
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
kim.mens
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
kim.mens
 
Code Refactoring
Code RefactoringCode Refactoring
Code Refactoring
kim.mens
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modelling
kim.mens
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
kim.mens
 
Towards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation FrameworkTowards a Context-Oriented Software Implementation Framework
Towards a Context-Oriented Software Implementation Framework
kim.mens
 
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty ApproachesTowards a Taxonomy of Context-Aware Software Variabilty Approaches
Towards a Taxonomy of Context-Aware Software Variabilty Approaches
kim.mens
 
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software EngineeringBreaking the Walls: A Unified Vision on Context-Oriented Software Engineering
Breaking the Walls: A Unified Vision on Context-Oriented Software Engineering
kim.mens
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programming
kim.mens
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflection
kim.mens
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
kim.mens
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
kim.mens
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Ruby
kim.mens
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
kim.mens
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalk
kim.mens
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflection
kim.mens
 
Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...Managing the Evolution of Information Systems with Intensional Views and Rela...
Managing the Evolution of Information Systems with Intensional Views and Rela...
kim.mens
 

Recently uploaded (20)

How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
The History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptxThe History of Kashmir Karkota Dynasty NEP.pptx
The History of Kashmir Karkota Dynasty NEP.pptx
Arya Mahila P. G. College, Banaras Hindu University, Varanasi, India.
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 
How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18How to Configure Public Holidays & Mandatory Days in Odoo 18
How to Configure Public Holidays & Mandatory Days in Odoo 18
Celine George
 
Cultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptxCultivation Practice of Onion in Nepal.pptx
Cultivation Practice of Onion in Nepal.pptx
UmeshTimilsina1
 
Cultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptxCultivation Practice of Garlic in Nepal.pptx
Cultivation Practice of Garlic in Nepal.pptx
UmeshTimilsina1
 
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptxU3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
U3 ANTITUBERCULAR DRUGS Pharmacology 3.pptx
Mayuri Chavan
 
What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)What is the Philosophy of Statistics? (and how I was drawn to it)
What is the Philosophy of Statistics? (and how I was drawn to it)
jemille6
 
Pope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptxPope Leo XIV, the first Pope from North America.pptx
Pope Leo XIV, the first Pope from North America.pptx
Martin M Flynn
 
How to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 PurchaseHow to Manage Amounts in Local Currency in Odoo 18 Purchase
How to Manage Amounts in Local Currency in Odoo 18 Purchase
Celine George
 
Final Evaluation.docx...........................
Final Evaluation.docx...........................Final Evaluation.docx...........................
Final Evaluation.docx...........................
l1bbyburrell
 
UPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guideUPMVLE migration to ARAL. A step- by- step guide
UPMVLE migration to ARAL. A step- by- step guide
abmerca
 
Ajanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of HistoryAjanta Paintings: Study as a Source of History
Ajanta Paintings: Study as a Source of History
Virag Sontakke
 
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living WorkshopLDMMIA Reiki Yoga S5 Daily Living Workshop
LDMMIA Reiki Yoga S5 Daily Living Workshop
LDM Mia eStudios
 
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFAMEDICAL BIOLOGY MCQS  BY. DR NASIR MUSTAFA
MEDICAL BIOLOGY MCQS BY. DR NASIR MUSTAFA
Dr. Nasir Mustafa
 
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
Mental Health Assessment in 5th semester bsc. nursing and also used in 2nd ye...
parmarjuli1412
 
Ancient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian HistoryAncient Stone Sculptures of India: As a Source of Indian History
Ancient Stone Sculptures of India: As a Source of Indian History
Virag Sontakke
 
CNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscessCNS infections (encephalitis, meningitis & Brain abscess
CNS infections (encephalitis, meningitis & Brain abscess
Mohamed Rizk Khodair
 
spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)spinal cord disorders (Myelopathies and radiculoapthies)
spinal cord disorders (Myelopathies and radiculoapthies)
Mohamed Rizk Khodair
 
2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx2025 The Senior Landscape and SET plan preparations.pptx
2025 The Senior Landscape and SET plan preparations.pptx
mansk2
 
antiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidenceantiquity of writing in ancient India- literary & archaeological evidence
antiquity of writing in ancient India- literary & archaeological evidence
PrachiSontakke5
 
Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...Classification of mental disorder in 5th semester bsc. nursing and also used ...
Classification of mental disorder in 5th semester bsc. nursing and also used ...
parmarjuli1412
 

Object-Oriented Design Heuristics

  • 1. OBJECT-ORIENTED
 DESIGN HEURISTICS LINGI2252 – PROF. KIM MENS * These slides are part of the course LINGI2252 “Software Maintenance and Evolution”, given by Prof. Kim Mens at UCL, Belgium *
  • 2. OBJECT-ORIENTED DESIGN HEURISTICS OBJECT-ORIENTED DESIGN HEURISTICS Arthur J. Riel
 Object-Oriented Design Heuristics
 © Addison-Wesley, 1996. 
 Other sources: A presentation by Prof. Kenneth M. Anderson, University of Colorado Boulder, on OO Design Heuristics (April 2002) A presentation by Prof. Harald Gall, University of Zurich, on OO Design Heuristics (2006) A blog by Marc Hoeijmans on Riel’s design heuristics (June 2012)
  • 3. OBJECT-ORIENTED DESIGN HEURISTICS WHEN IS A SYSTEM IS WELL-DESIGNED? How to know if the OO design of your system is good / bad / in between? If you ask an OO guru : “a design is good when it feels right” How to know when it feels right? Subconsciously, a guru runs through a list of design heuristics built up through previous design experience. If the heuristics pass, then the design feels right. If they do not pass, the design does not feel right. Riel’s book tries to make these heuristics explicit. 3
  • 4. OBJECT-ORIENTED DESIGN HEURISTICS OBJECT-ORIENTED DESIGN HEURISTICS Arthur J. Riel
 Object-Oriented Design Heuristics
 © Addison-Wesley, 1996. ~60 language-independent guidelines Offering insights into OO design improvement No hard rules, only heuristics : can be ignored when not relevant Targeted to programmers to improve their OO programming and design skills Based on Riel’s experience as CS teacher and OO A&D consultant
  • 5. OBJECT-ORIENTED DESIGN HEURISTICS CATEGORIES OF OO DESIGN HEURISTICS A. Classes and Objects B. Topology of Procedural vs. Object-Oriented Applications C. Relationships Between Classes and Objects D. The Inheritance Relationship E. Multiple Inheritance Other Categories: F. Association Relationship G. Class-Specific Data and Behaviour H. Physical object-oriented design 5
  • 6. OBJECT-ORIENTED DESIGN HEURISTICS A WORD OF WARNING… Not all heuristics work together perfectly. Some may even be directly opposed ! There are always trade-offs to be made in analysis and design. E.g., a change to reduce complexity may reduce flexibility. You have to decide which heuristic makes most sense for your particular context. Heuristics are not “golden” rules that always work. 6
  • 7. OBJECT-ORIENTED DESIGN HEURISTICS A. CLASSES AND OBJECTS The Building Blocks of the Object Oriented Paradigm 7
  • 8. OBJECT-ORIENTED DESIGN HEURISTICS HIDING DATA Heuristic A.1 All data should be hidden within its class.
 8 When developers say : “I need to make this piece of data public because...” They should ask themselves : “What is it that I’m trying to do with this data and why cannot the class perform that operation for me?” Does it really have to be exposed to others? Does this piece of data really belong in this class?
  • 9. OBJECT-ORIENTED DESIGN HEURISTICS NO DEPENDENCE ON CLIENTS Heuristic A.2 Users of a class must be dependent on its public interface, but a class should not be dependent on its users. 9 Why?
  • 10. OBJECT-ORIENTED DESIGN HEURISTICS NO DEPENDENCE ON CLIENTS Heuristic A.2 Users of a class must be dependent on its public interface, but a class should not be dependent on its users. Why? Reusability ! 10 For example, a person can make use of an alarm clock, but the alarm clock shouldn’t know about the person.
 Otherwise the alarm clock couldn’t be reused for other persons. A PERSON NAME: BOB JONES AGE: 31 SSN: 037439087 TEL: 991-4671 AN ALARM CLOCK HOUR: 12
 MINUTE: 34
 ALARM HOUR: 6 ALARM MINUTE: 0 ALMR STATUS: ON
  • 11. OBJECT-ORIENTED DESIGN HEURISTICS ONE CLASS = ONE RESPONSIBILITY Heuristic A.8 A class should capture one and only one key abstraction. 11 A class should be cohesive.
 Try to have one clear responsibility per class.

  • 12. OBJECT-ORIENTED DESIGN HEURISTICS SMALL CLASSES Heuristic A.3 Minimise the number of messages in the protocol of a class. (protocol of a class means the set of messages to which an instance of the class can respond)
 Keep it small. The problem with large public interfaces is that you can never find what you are looking for. A smaller public interface make a class easier to understand and modify. 12
  • 13. OBJECT-ORIENTED DESIGN HEURISTICS SUPPORTING POLYMORPHISM AND COMMUNICATION Heuristic A.4 Implement a minimal public interface that all classes understand. E.g., operations such as copy (deep versus shallow), equality testing, pretty printing, parsing from a ASCII description, etc.
 Why? To be able to send the same message to different objects. To be able to substitute them. 13
  • 14. OBJECT-ORIENTED DESIGN HEURISTICS CLEAR PUBLIC INTERFACE Keep it clean: Users of a class do not want to see operations in the public interface that they are not supposed to use, cannot use, or are not interested in using.
 Heuristic A.5 Do not put implementation details such as common-code private functions into the public interface of a class. Heuristic A.6 Do not clutter the public interface of a class with items that clients are not able to use or are not interested in using. 14
  • 15. OBJECT-ORIENTED DESIGN HEURISTICS MINIMISE CLASSES INTERDEPENDENCIES Strive for loose coupling !
 Heuristic A.7 A class should only use operations in the public interface of another class or have nothing to do with that class. 15
  • 16. OBJECT-ORIENTED DESIGN HEURISTICS STRENGTHEN ENCAPSULATION A class should be cohesive. Move data close to behaviour. Heuristic A.9 Keep related data and behaviour in one place. (Similar to the “Move Method” refactoring pattern.) Heuristic A.10 Spin off non-related information into another class. (Similar to the “Extract Class” refactoring pattern.) 16
  • 17. OBJECT-ORIENTED DESIGN HEURISTICS ROLES VS. CLASSES Heuristic A.11 Be sure the abstractions that you model are classes and not simply the roles objects play. Are mother and father different classes or rather roles of Person? No magic answer: depends on the domain. Do they have different behaviour? If so, then they are more likely to be distinct classes. 17
  • 18. OBJECT-ORIENTED DESIGN HEURISTICS B. TOPOLOGIES OF PROCEDURAL VS. OO APPLICATIONS This category of heuristics is about the use of non-OO structures in OO applications. Procedural topologies break an application down to functions sharing data structures. In such a topology it is easy to see which functions access which data structures, but difficult to see which data structures are used by which functions. Changing a data structure may have unintended consequences on the functions using it. Object-oriented topologies try to keep the data closer to the behaviour. 18
  • 19. OBJECT-ORIENTED DESIGN HEURISTICS TYPICAL PROBLEMS Two typical problems that arise when developers familiar with procedural techniques try to create an OO design: The God Class A single class that drives the application;
 all other classes are data holders. Proliferation of Classes Problems with modularisation taken too far. Too many classes that are too small in size/scope make the system hard to use, debug and maintain. 19
  • 20. OBJECT-ORIENTED DESIGN HEURISTICS AVOID CREATING GOD CLASSES Do not create God classes that control all other classes. Heuristic B.12 Distribute system intelligence horizontally as uniformly as possible, that is the top level classes in a design should share the work uniformly. Heuristic B.13 Do not create god classes or god objects in your system. Be very suspicious of classes whose name contains DRIVER, MANAGER, SYSTEM, SUBSYSTEM, etc. 20
  • 21. OBJECT-ORIENTED DESIGN HEURISTICS BASIC CHECKS FOR GOD CLASS DETECTION Heuristic B.14 Beware of classes that have many accessor methods defined in their interface. This may imply that related data and behaviour are not being kept in the same place. Heuristic B.15 Beware of classes that have too much non-communicating behaviour, that is, methods that only operate on a proper subset of their data members. God classes often exhibit a great deal of non-communicating behaviour. 21
  • 22. OBJECT-ORIENTED DESIGN HEURISTICS AVOID CLASS PROLIFERATION Heuristic B.18 Eliminate irrelevant classes from your design. Irrelevant classes often only have get, set, and print methods. Heuristic B.19 Eliminate classes that are outside the system. Principle of domain relevance. Heuristic B.20 Do not turn an operation into a class. Be suspicious of any class whose name is a verb or is derived from a verb, especially those which have only one piece of meaningful behaviour. Ask yourself if that piece of meaningful behaviour needs to be migrated to some existing or undiscovered class.
  • 23. OBJECT-ORIENTED DESIGN HEURISTICS HOW TO MODEL AN OBJECT-0RIENTED APPLICATION? Heuristic B.17 Model the real world whenever possible. (This heuristic is often violated for reasons of system intelligence distribution, avoidance of god classes, and the keeping of related data and behaviour in one place.) What if you want two different UIs for the same model? Heuristic B.16 In applications that consist of an object oriented model interacting with a user interface, the model should never be dependent on the interface. The interface should be dependent on the model. 23
  • 24. OBJECT-ORIENTED DESIGN HEURISTICS C. RELATIONSHIPS BETWEEN CLASSES AND OBJECTS As a general guideline : High cohesion inside classes and objects Loose coupling between classes and objects 24
  • 25. OBJECT-ORIENTED DESIGN HEURISTICS MINIMIZING COUPLING BETWEEN CLASSES Heuristic C.22 Minimize the number of classes with which another class collaborates. Look for situations where one class communicates with a group of classes. Ask if it is possible to replace the group by a class that contains the group.
 STRIVE FOR
 LOOSE COUPLING ! 25
  • 26. OBJECT-ORIENTED DESIGN HEURISTICS MINIMIZING COUPLING BETWEEN CLASSES Related heuristics :
 Heuristic C.23 : Minimize the number of message sends between a class and its collaborator. (Counter example: Visitor design pattern)
 Heuristic C.24 : Minimize the amount of collaboration between a class and its collaborator, that is, the number of different messages sent.
 Heuristic C.25 : Minimize fanout in a class, that is the product of the number of messages defined by the class and the messages they send. STRIVE FOR
 LOOSE COUPLING ! 26
  • 27. OBJECT-ORIENTED DESIGN HEURISTICS ABOUT THE USE RELATIONSHIP When an object “uses” another one it should get a reference to it in order to interact with it Ways to get references : (containment) contains instance variables of the class of the other object the other object is passed as argument asked to a third party object (mapping…) instance creation of the other object and then interact with it 27
  • 28. OBJECT-ORIENTED DESIGN HEURISTICS CONTAINMENT AND USES Heuristic C.26 If a class contains objects of another class, then the containing class should be sending messages to the contained objects that is, the containment relationship should always imply a “uses” relationship. Heuristic C.34 A class must know what it contains, but should never know who contains it. (Do not depend on your users.) 28
  • 29. OBJECT-ORIENTED DESIGN HEURISTICS COHERENCE IN CLASSES Heuristic C.27 : Most of the methods defined on a class should be using most of the data members most of the time. A class should be cohesive.
 Heuristic C.28 : Classes should not contain more objects than a developer can fit in his or her short-term memory. A favourite value for this number is six (or seven).
 Heuristic C.29 : Distribute system intelligence vertically down narrow and deep containment hierarchies. 29 STRIVE FOR
 HIGH COHESION !
  • 30. OBJECT-ORIENTED DESIGN HEURISTICS D. THE INHERITANCE RELATIONSHIP 30
  • 31. OBJECT-ORIENTED DESIGN HEURISTICS INHERITANCE DEPTH Heuristic D.39 In theory, inheritance hierarchies should be deep - the deeper the better Heuristic D.40 In practice, however, inheritance hierarchies should be no deeper than an average person can keep in his or her short term memory. A popular value for this is six. 31
  • 32. OBJECT-ORIENTED DESIGN HEURISTICS ABSTRACT CLASSES = BASE CLASSES Heuristic D.41. All abstract classes must be base classes. Heuristic D.42 : All base classes must be abstract classes. Base class = class with at least one subclass Abstract class = class with at least one abstract method These heuristics are controversial ! 32
  • 33. OBJECT-ORIENTED DESIGN HEURISTICS ABSTRACT CLASSES = BASE CLASSES : CONTROVERSIAL ! Heuristic D.41 : All abstract classes must be base classes. Intuition : why make a method abstract if you won’t concretise it in a subclass? Counter-example : application frameworks Heuristic D.42 : All base classes must be abstract classes. Intuition : methods overridden in the subclasses should be abstract in the superclass Not necessarily true : they can have a default behaviour or value in the superclass; the subclass may add only new methods 33
  • 34. OBJECT-ORIENTED DESIGN HEURISTICS BASE CLASSES IN INHERITANCE HIERARCHIES Heuristic D.37 Derived classes must have knowledge of their base class by definition, but base classes should not know anything about their derived classes. A superclass should not know its subclasses. Heuristic D.38 All data in a base class should be private; do not use protected data. Subclasses should not use directly data of superclasses. Heuristic D.51 It should be illegal for a derived class to override a base class method with a NOP method, that is, a method that does nothing. 34
  • 35. OBJECT-ORIENTED DESIGN HEURISTICS COMMONALITIES IN INHERITANCE HIERARCHIES Heuristic D.43 Factor the commonality of data, behaviour, and/or interface, as high as possible in the inheritance hierarchy. Heuristic D.45 If two or more classes have common data (variables) and behaviour (that is, methods), then those classes should each inherit from a common base class that captures those data and methods. 35
  • 36. OBJECT-ORIENTED DESIGN HEURISTICS COMMONALITIES IN INHERITANCE HIERARCHIES Heuristic D.44 If two or more classes share only common data (no common behaviour), then that common data should be placed in a class that will be contained by each sharing class. Heuristic D.44.bis If two or more classes share only common interface (i.e. messages, not methods) then they should inherit from a common base class only if they will be used polymorphically.
  • 37. OBJECT-ORIENTED DESIGN HEURISTICS AVOID TYPE CHECKS (ESSENTIAL !) Heuristic D.46 Explicit case analysis on the type of an object is usually an error. or at least bad design : the designer should use polymorphism instead in most of these cases indeed, an object should be responsible of deciding how to answer to a message a client should just send messages and not discriminate messages sent based on receiver type 37
  • 38. OBJECT-ORIENTED DESIGN HEURISTICS AVOID CASE CHECKS Heuristic D.47 Explicit case analysis on the value of an attribute is often an error. The class should be decomposed into an inheritance hierarchy, where each value of the attribute is transformed into a derived class. 38
  • 39. OBJECT-ORIENTED DESIGN HEURISTICS INHERITANCE = SPECIALISATION Heuristic D.36 Inheritance should be used only to model a specialisation hierarchy. Do not confuse inheritance and containment. Containment is black-box.
 Inheritance is white-box. Heuristic D.52 Do not confuse optional containment with the need for inheritance. Modelling optional containment with inheritance will lead to a proliferation of classes. 39
  • 40. OBJECT-ORIENTED DESIGN HEURISTICS DYNAMIC SEMANTICS Heuristic D.48 Do not model the dynamic semantics of a class through the use of an inheritance relationship. An attempt to model dynamic semantics with a static semantic relationship will lead to a toggling of types at run time. Heuristic D.49 Do not turn objects of a class into derived classes of the class. Be very suspicious of any derived class for which there is only one instance. Heuristic D.50 If you think you need to create new classes at run time, take a step back and realise that what you are trying to create are objects. Now generalise these objects into a new class. 40
  • 41. OBJECT-ORIENTED DESIGN HEURISTICS FRAMEWORKS Heuristic D.53 When building an inheritance hierarchy, try to construct reusable frameworks rather than reusable components. 41
  • 42. OBJECT-ORIENTED DESIGN HEURISTICS E. MULTIPLE INHERITANCE 42
  • 43. OBJECT-ORIENTED DESIGN HEURISTICS PROVE MULTIPLE INHERITANCE Avoid using multiple inheritance when possible. (It’s too easy to misuse it).
 Heuristic E.54 If you have an example of multiple inheritance in your design, assume you have made a mistake and then prove otherwise. 
 Most common mistake: Using multiple inheritance in place of containment 43
  • 44. OBJECT-ORIENTED DESIGN HEURISTICS QUESTION IT Heuristic E.55 Whenever there is inheritance in an OO design, ask yourself two questions: (a) Am I a special type of the thing from which I am inheriting? (b) Is the thing from which I am inheriting part of me? A yes to (a) and no to (b) would imply the need for inheritance. A no to (a) and a yes to (b) would imply the need for composition instead? – Is an airplane a special type of fuselage? No (the fuselage is the body of an airplane) – Is a fuselage part of an airplane? Yes 44
  • 45. OBJECT-ORIENTED DESIGN HEURISTICS QUESTION IT Heuristic E.56 Whenever you have found a multiple inheritance relationship in an OO design, be sure that no base class is actually a derived class of another base class. i.e. accidental multiple inheritance. 45
  • 46. OBJECT-ORIENTED DESIGN HEURISTICS MULTIPLE INHERITANCE So, is there a valid use of multiple inheritance? Yes, subtyping for combination When defining a new class that is a special type of two other classes and those two base classes are from different domains WOODEN OBJECT DOOR WOODEN
 DOOR 46
  • 47. OBJECT-ORIENTED DESIGN HEURISTICS MULTIPLE INHERITANCE Is a wooden door a special type of door? Yes
 Is a door part of a wooden door? No
 
 Is a wooden door a special type of wooden object? Yes
 Is a wooden object part of a door? No 
 Is a wooden object a special type of door? No
 Is a door a special type of wooden object? No All Heuristics Pass! WOODEN OBJECT DOOR WOODEN
 DOOR 47
  • 48. OBJECT-ORIENTED DESIGN HEURISTICS OTHER CATEGORIES OF OBJECT-ORIENTED DESIGN HEURISTICS F. The Association Relationship G. Class-Specific Data and Behaviour H. Physical object-oriented design 48
  • 49. OBJECT-ORIENTED DESIGN HEURISTICS F. THE ASSOCIATION RELATIONSHIP Heuristic F.57 : Containment or Association? When given a choice in an OO design between a containment and association, choose the containment relationship. 49
  • 50. OBJECT-ORIENTED DESIGN HEURISTICS G. CLASS-SPECIFIC DATA AND BEHAVIOUR Heuristic G.58 : No global bookkeeping Do not use global data or functions to perform bookkeeping information on the objects of a class. Class variables or methods should be used instead. 50
  • 51. OBJECT-ORIENTED DESIGN HEURISTICS H. PHYSICAL OBJECT-ORIENTED DESIGN Heuristic H.59 OO designers should not allow physical design criteria to corrupt their logical designs. However, physical design criteria often are used in the decision-making process at logical design time. Heuristic H.60 Do not change the state of an object without going through its public interface. 51
  • 53. OBJECT-ORIENTED DESIGN HEURISTICS SUMMARY Use the guidelines for : insightful analysis critical reviews as guide for better OO design to build reusable components and frameworks
  • 54. OBJECT-ORIENTED DESIGN HEURISTICS POSSIBLE QUESTIONS ▸ Give and explain at least 2 design heuristics about the relation between a subclass and its superclass. ▸ Discuss the design heuristics which state that “All abstract classes must be base classes” and “All base classes should be abstract classes”. Do you agree with these heuristics? Under what conditions? ▸ Several design heuristics are related to the need for high cohesion. Discuss 2 such heuristics and their relation with cohesion. ▸ Several design heuristics are related to the need for loose coupling. Discuss 2 such heuristics and their relation with coupling. ▸ Discuss the following design heuristic “Explicit case analysis on the type of an object is usually an error.” ▸ Give a concrete example of and discuss when multiple inheritance would be a valid design solution.
  翻译: