SlideShare a Scribd company logo
1 of 54
Download to read offline
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
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.

More Related Content

What's hot

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationOğuzhan Soykan
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design PatternSanae BEKKAR
 
Interface specification
Interface specificationInterface specification
Interface specificationmaliksiddique1
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochSorina Chirilă
 
Facebook api
Facebook api Facebook api
Facebook api snipermkd
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean ArchitectureMattia Battiston
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software designMatthias Noback
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignYoung-Ho Cho
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slidesthinkddd
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan GoleChetan Gole
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introductionwojtek_s
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean ArchitectureRoc Boronat
 
Design Patterns
Design PatternsDesign Patterns
Design Patternssoms_1
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignRyan Riley
 

What's hot (20)

Domain driven design
Domain driven designDomain driven design
Domain driven design
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Interface specification
Interface specificationInterface specification
Interface specification
 
Object-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady BoochObject-Oriented Analysis And Design With Applications Grady Booch
Object-Oriented Analysis And Design With Applications Grady Booch
 
Facebook api
Facebook api Facebook api
Facebook api
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Real Life Clean Architecture
Real Life Clean ArchitectureReal Life Clean Architecture
Real Life Clean Architecture
 
Hexagonal architecture - message-oriented software design
Hexagonal architecture  - message-oriented software designHexagonal architecture  - message-oriented software design
Hexagonal architecture - message-oriented software design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Restful web services ppt
Restful web services pptRestful web services ppt
Restful web services ppt
 
A Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation SlidesA Practical Guide to Domain Driven Design: Presentation Slides
A Practical Guide to Domain Driven Design: Presentation Slides
 
Design Patterns Presentation - Chetan Gole
Design Patterns Presentation -  Chetan GoleDesign Patterns Presentation -  Chetan Gole
Design Patterns Presentation - Chetan Gole
 
Domain Driven Design Introduction
Domain Driven Design IntroductionDomain Driven Design Introduction
Domain Driven Design Introduction
 
Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 

Viewers also liked

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 ApplicationsPerconaPerformance
 
Neuro linguistic programming
Neuro linguistic programmingNeuro linguistic programming
Neuro linguistic programmingNiharika Thakkar
 
What is DBT?
What is DBT?What is DBT?
What is DBT?dbtonline
 
Learning Nlp
Learning NlpLearning Nlp
Learning NlpMike 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 presuppositionsAshLawrence
 
Object? You Keep Using that Word
Object? You Keep Using that WordObject? You Keep Using that Word
Object? You Keep Using that WordKevlin Henney
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and conceptsSlideshare
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our WaysKevlin 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 homeCyber-Duck
 
Neuro Linguistic Programming
Neuro Linguistic ProgrammingNeuro Linguistic Programming
Neuro Linguistic Programmingsmjk
 
Principles of Design - Graphic Design Theory
Principles of Design - Graphic Design TheoryPrinciples of Design - Graphic Design Theory
Principles of Design - Graphic Design TheoryAbanoub Hanna
 
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explainedCraft Design
 

Viewers also liked (14)

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
 
Salt Lake City 2013 - Presentation
Salt Lake City 2013 - PresentationSalt Lake City 2013 - Presentation
Salt Lake City 2013 - Presentation
 
Neuro linguistic programming
Neuro linguistic programmingNeuro linguistic programming
Neuro linguistic programming
 
What is DBT?
What is DBT?What is DBT?
What is DBT?
 
Learning Nlp
Learning NlpLearning Nlp
Learning Nlp
 
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...
 
13 nlp presuppositions
13 nlp presuppositions13 nlp presuppositions
13 nlp presuppositions
 
Object? You Keep Using that Word
Object? You Keep Using that WordObject? You Keep Using that Word
Object? You Keep Using that Word
 
Design process and concepts
Design process and conceptsDesign process and concepts
Design process and concepts
 
The Error of Our Ways
The Error of Our WaysThe Error of Our Ways
The Error of Our Ways
 
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
 
Neuro Linguistic Programming
Neuro Linguistic ProgrammingNeuro Linguistic Programming
Neuro Linguistic Programming
 
Principles of Design - Graphic Design Theory
Principles of Design - Graphic Design TheoryPrinciples of Design - Graphic Design Theory
Principles of Design - Graphic Design Theory
 
10 Usability Heuristics explained
10 Usability Heuristics explained10 Usability Heuristics explained
10 Usability Heuristics explained
 

Similar to Object-Oriented Design Heuristics

Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven DesignHarsh Jegadeesan
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patternsAmit Kabra
 
Intelligent Tutorial Systems
Intelligent Tutorial SystemsIntelligent Tutorial Systems
Intelligent Tutorial SystemsMartin Homik
 
Introaied nancy2019 luengo
Introaied nancy2019 luengoIntroaied nancy2019 luengo
Introaied nancy2019 luengoVanda Luengo
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilitiesguest2a92cd9
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxDrYogeshDeshmukh1
 
EdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper AwardEdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper AwardAlan Amory
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environmentsfridolin.wild
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsMichael 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 patternsKyle Mathews
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMilos 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.pptxMaha 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 Standardsrekharajaseran
 
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
 

Similar to Object-Oriented Design Heuristics (20)

Responsibility Driven Design
Responsibility Driven DesignResponsibility Driven Design
Responsibility Driven Design
 
Introduction to design patterns
Introduction to design patternsIntroduction to design patterns
Introduction to design patterns
 
Intelligent Tutorial Systems
Intelligent Tutorial SystemsIntelligent Tutorial Systems
Intelligent Tutorial Systems
 
PMSE pdf
PMSE pdfPMSE pdf
PMSE pdf
 
Introaied nancy2019 luengo
Introaied nancy2019 luengoIntroaied nancy2019 luengo
Introaied nancy2019 luengo
 
Patterns of Assigning Responsibilities
Patterns of Assigning ResponsibilitiesPatterns of Assigning Responsibilities
Patterns of Assigning Responsibilities
 
Unit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptxUnit No 6 Design Patterns.pptx
Unit No 6 Design Patterns.pptx
 
testtesttest
testtesttesttesttesttest
testtesttest
 
EdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper AwardEdMedia 2017 Outstanding Paper Award
EdMedia 2017 Outstanding Paper Award
 
Unit iii design patterns 9
Unit iii design patterns 9Unit iii design patterns 9
Unit iii design patterns 9
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
 
PATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design PatternsPATTERNS01 - An Introduction to Design Patterns
PATTERNS01 - An Introduction to Design Patterns
 
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
 
Mash-Up Personal Learning Environments
Mash-Up Personal Learning EnvironmentsMash-Up Personal Learning Environments
Mash-Up Personal Learning Environments
 
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
 
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
 
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
 
Grasp
GraspGrasp
Grasp
 
Sicilia-Aera08
Sicilia-Aera08Sicilia-Aera08
Sicilia-Aera08
 
Affordances
Affordances Affordances
Affordances
 

More from kim.mens

Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolutionkim.mens
 
Context-Oriented Programming
Context-Oriented ProgrammingContext-Oriented Programming
Context-Oriented Programmingkim.mens
 
Software Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented ProgrammingSoftware Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented Programmingkim.mens
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smellskim.mens
 
Software Patterns
Software PatternsSoftware Patterns
Software Patternskim.mens
 
Code Refactoring
Code RefactoringCode Refactoring
Code Refactoringkim.mens
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modellingkim.mens
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworkskim.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 Frameworkkim.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 Approacheskim.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 Engineeringkim.mens
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programmingkim.mens
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflectionkim.mens
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Javakim.mens
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in javakim.mens
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Rubykim.mens
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Rubykim.mens
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalkkim.mens
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflectionkim.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
 

More from kim.mens (20)

Software Maintenance and Evolution
Software Maintenance and EvolutionSoftware Maintenance and Evolution
Software Maintenance and Evolution
 
Context-Oriented Programming
Context-Oriented ProgrammingContext-Oriented Programming
Context-Oriented Programming
 
Software Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented ProgrammingSoftware Reuse and Object-Oriented Programming
Software Reuse and Object-Oriented Programming
 
Bad Code Smells
Bad Code SmellsBad Code Smells
Bad Code Smells
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Code Refactoring
Code RefactoringCode Refactoring
Code Refactoring
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modelling
 
Object-Oriented Application Frameworks
Object-Oriented Application FrameworksObject-Oriented Application Frameworks
Object-Oriented Application Frameworks
 
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
 
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
 
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
 
Context-oriented programming
Context-oriented programmingContext-oriented programming
Context-oriented programming
 
Basics of reflection
Basics of reflectionBasics of reflection
Basics of reflection
 
Advanced Reflection in Java
Advanced Reflection in JavaAdvanced Reflection in Java
Advanced Reflection in Java
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
 
Reflection in Ruby
Reflection in RubyReflection in Ruby
Reflection in Ruby
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
 
Introduction to Smalltalk
Introduction to SmalltalkIntroduction to Smalltalk
Introduction to Smalltalk
 
A gentle introduction to reflection
A gentle introduction to reflectionA gentle introduction to reflection
A gentle introduction to reflection
 
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...
 

Recently uploaded

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfPrerana Jadhav
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseCeline George
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...DhatriParmar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 

Recently uploaded (20)

Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Narcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdfNarcotic and Non Narcotic Analgesic..pdf
Narcotic and Non Narcotic Analgesic..pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
How to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 DatabaseHow to Make a Duplicate of Your Odoo 17 Database
How to Make a Duplicate of Your Odoo 17 Database
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
Blowin' in the Wind of Caste_ Bob Dylan's Song as a Catalyst for Social Justi...
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 

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
  • 52.
  • 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.