SlideShare a Scribd company logo
Design Patterns – Eran Toch
Methodologies in Information System Development
Design Patterns:Design Patterns:
Talking in the Design LanguageTalking in the Design Language
Eran Toch
Methodologies in the Development
of Information Systems
Design Patterns – Eran Toch
2November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
– The Composite Pattern
• Behavioral Patterns
– The Strategy Pattern
• Creational Patterns
– The Singleton Pattern
• Human Interaction Patterns
– Go Back to a Safe Place
• Summary
Design Patterns – Eran Toch
3November 2003
What is a Design Pattern?What is a Design Pattern?
In Short, a solution
for a typical problem
“a description of a recurrent
problem and of the core of possible
solutions.“
Design Patterns – Eran Toch
4November 2003
Why do we need them?Why do we need them?
• Problems are not always unique. Reusing
existing experience might be proved useful.
• We need a common language to describe
problems and solutions.
• The Design of Object-Oriented systems limits
the scope of problems and solutions we can
talk about
Design Patterns – Eran Toch
5November 2003
History of Design PatternsHistory of Design Patterns
Christopher Alexander
A Pattern Language: Towns, Buildings Construction 1970’
1995’
2000’
Architecture
Object Oriented
Software Design
Other Areas:
HCI, Organizational Behavior…
Gang of Four (GoF)
Design Patterns: Elements of
Reusable Object-Oriented Software
Many Authors
Design Patterns – Eran Toch
6November 2003
Structure of a design patternStructure of a design pattern
• Pattern Name and Classification
• Intent
– a Short statement about what the pattern does
• Motivation
– A scenario that illustrates where the pattern would be
useful
• Applicability
– Situations where the pattern can be used
Design Patterns – Eran Toch
7November 2003
Structure of a design pattern – cont’dStructure of a design pattern – cont’d
• Structure
– A graphical representation of the pattern
• Participants
– The classes and objects participating in the pattern
• Collaborations
– How to do the participants interact to carry out their
responsibilities?
• Consequences
– What are the pros and cons of using the pattern?
• Implementation
– Hints and techniques for implementing the pattern
Design Patterns – Eran Toch
8November 2003
Classification of patternsClassification of patterns
• Structural
– Composite*, Decorator, Façade, Adapter…
• Behavioral
– Strategy*, Command, Observer, Chain of
Responsibilities…
• Creational
– Singleton*, Abstract Factory, Factory Method…
• Other
– User interface Patterns
• Go Back to a Safe Place
Design Patterns – Eran Toch
9November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
Design Patterns – Eran Toch
10November 2003
The Composite PatternThe Composite Pattern
• Intent:
– Compose objects into tree structures to represent
part-whole hierarchies.
– Composite lets clients treat individual objects and
compositions of objects uniformly. This is called
recursive composition.
Design Patterns – Eran Toch
11November 2003
MotivationMotivation
When Processing the hierarchal
collection, we need to query the
type of the object (composite or
primitive) and act differently
Diagram reference: Design
Patterns [Gof]
Design Patterns – Eran Toch
12November 2003
Composite: ApplicabilityComposite: Applicability
• Use the Composite pattern when:
– You want to represent part-whole hierarchies of
objects.
– You want clients to be able to ignore the
difference between compositions of objects and
individual objects. Clients will treat all objects in
the composite structure uniformly.
Design Patterns – Eran Toch
13November 2003
Composite: StructureComposite: Structure
• Define an abstract base class that specifies the
uniform behavior.
• Subclass the Primitive and Composite classes of the
Component class.
Diagram reference: Design
Patterns [Gof]
Design Patterns – Eran Toch
14November 2003
Composite: ConsequencesComposite: Consequences
• Benefits
– It makes it easy to add new kinds of components
– It makes clients simpler, since they do not have to
know if they are dealing with a leaf or a composite
component
• Liabilities
– It makes it harder to restrict the type of components of
a composite
Design Patterns – Eran Toch
15November 2003
Composite: Known UsesComposite: Known Uses
1. A GUI system has window objects which can
contain various GUI components (widgets) such as,
buttons and text areas. A window can also contain
widget container objects which can hold other
widgets.
Concrete examples: Java Swing, MFC
2. Folder based file system
3. Arithmetic expressions
Design Patterns – Eran Toch
16November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
Design Patterns – Eran Toch
17November 2003
The Strategy PatternThe Strategy Pattern
• Intent:
– Define a family of algorithms, encapsulate each one,
and make them interchangeable.
– Strategy lets the algorithm vary independently from
clients that use it.
Design Patterns – Eran Toch
18November 2003
Strategy: MotivationStrategy: Motivation
The client wants to use the algorithm
without knowing which one to use in
advance. We want to add new
algorithms without changing the
client class.
Design Patterns – Eran Toch
19November 2003
Strategy: StructureStrategy: Structure
• Encapsulate the behavior of the context class in a
separate algorithm class.
• The context class keeps a reference to the algorithm
class and passes on the messages.
• The algorithm class can be sub-classed to support
multiple algorithms.
Design Patterns – Eran Toch
20November 2003
Strategy: ConsequencesStrategy: Consequences
• Benefits
– Provides an alternative to subclassing the Context
class to get a variety of algorithms or behaviors
– Keeps the client clean from large conditional
statements
– Provides a choice of implementations for the same
behavior
• Liabilities
– Increases the number of objects
– All algorithms must use the same Strategy interface
– We still need conditional statements!
Design Patterns – Eran Toch
21November 2003
Strategy: Known UsesStrategy: Known Uses
• QSIA Learning System
• Layout Manager in Java
Swing
• Sorting algorithms,
memory allocation
algorithms and more…
Design Patterns – Eran Toch
22November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
Design Patterns – Eran Toch
23November 2003
The Singleton PatternThe Singleton Pattern
• Intent.
– Ensure a class only has one instance, and provide a
global point of access to it.
• Motivation.
– Sometimes, an application needs one, and only one,
instance of an object. For example, we want just one
window manager. Or just one factory for a family of
products.
– We need to have that one instance easily accessible.
– And we want to ensure that additional instances of the
class can not be created.
Design Patterns – Eran Toch
24November 2003
Singleton: StructureSingleton: Structure
• Declare the single instance as a private static data
member.
• Provide a public static member function that
encapsulates all initialization code, and provides
access to the instance.
Design Patterns – Eran Toch
25November 2003
Singleton: Example CodeSingleton: Example Code
public class Singleton {
// The private reference to the one and only instance.
private static Singleton uniqueInstance = null;
// An instance attribute.
private int data = 0;
/**
* Returns a reference to the single instance.
* Creates the instance if it does not yet exist.
*/
public static Singleton instance() {
if(uniqueInstance == null)
uniqueInstance = new Singleton();
return uniqueInstance;
}
/**
* The Singleton Constructor. Note that it is private!
* No client can instantiate a Singleton object!
*/
private Singleton() {}
}
Design Patterns – Eran Toch
26November 2003
Singleton: Example Code – cont’dSingleton: Example Code – cont’d
public class TestSingleton {
public static void main(String args[]) {
// Get a reference to the single instance of Singleton.
Singleton s = Singleton.instance();
// Set the data value.
s.setData(34);
System.out.println("First reference: " + s);
System.out.println("Singleton data value is: " + s.getData());
// Get another reference to the Singleton.
// Is it the same object?
s = null;
s = Singleton.instance();
System.out.println("nSecond reference: " + s);
System.out.println("Singleton data value is: " + s.getData());
}
}
What will be the output?
Design Patterns – Eran Toch
27November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
Design Patterns – Eran Toch
28November 2003
Human Interaction PatternsHuman Interaction Patterns
• A Pattern language to describe human
interaction situations
• Examples:
– Go Back to a Safe Place
– Form
– Control Panel
– WYSIWYG Editor
– Hierarchical Set
– Map of Navigable Spaces
– More…
Design Patterns – Eran Toch
29November 2003
Go Back to a Safe PlaceGo Back to a Safe Place
• Problem:
– How can the artifact make navigation easy, convenient, and
psychologically safe for the user?
• Forces:
– A user may forget where they were, if they stop using the artifact
while they're in the middle of something and don't get back to it
for a while.
– If the user gets into a space or a state that they don't want to be
in, they will want to get out of it in a safe and predictable way.
– The user is more likely to explore an artifact if they are assured
that they can easily get out of an undesired state or space; that
assurance engenders a feeling of security.
Design Patterns – Eran Toch
30November 2003
Go Back to a Safe PlaceGo Back to a Safe Place
• Solution:
– Provide a way to go back to a checkpoint of the user's
choice.
• Examples:
– The "Home" button on a Web browser
– Turning back to the beginning of a chapter in a
physical book or magazine
– The “undo" feature on some computer applications
Design Patterns – Eran Toch
31November 2003
AgendaAgenda
• What is a Design Pattern?
• Structural Patterns
• Behavioral Patterns
• Creational Patterns
• Human Interaction Patterns
• Summary
Design Patterns – Eran Toch
32November 2003
SummarySummary
• Patterns learned:
– Composite, Strategy, Singleton, Go Back to a Safe
Place.
• Advantages of Design Patterns:
– They capture expertise and make it accessible to non-
experts.
– Their names collectively form a vocabulary that helps
developers communicate better.
– They help people understand a system more quickly
when it is documented with the patterns it uses.
Design Patterns – Eran Toch
33November 2003
ReferencesReferences
• Design Patterns: Elements of Reusable Object-Oriented
Software, Gamma E. et el., 1995, Addison-Wesley.
• A course from Bob Tarr from UMBC University
http://www.research.umbc.edu/~tarr/dp/fall00/cs491.html
• The Design Patterns Java Companion, James W. Cooper (an
online version of the book)
http://www.patterndepot.com/put/8/JavaPatterns.htm
• A Site dedicated to Design Patterns by Vince Huston
http://home.earthlink.net/~huston2/dp/patterns.html
• Seven Habits of Successful Pattern Writers, John Vlissides
http://hillside.net/patterns/papers/7habits.html
• COMMON GROUND: A Pattern Language for Human-
Computer Interface Design, Jenifer Tidwell,
http://www.mit.edu/~jtidwell/common_ground_onefile.html
Design Patterns – Eran Toch
34November 2003
Doesn’t it go too far?Doesn’t it go too far?
• Taken from Vince Huston’s site about Design
Patterns:
Design Patterns – Eran Toch
Methodologies in Information System Development
Thanks!Thanks!

More Related Content

PPT
08060 c foils
PPT
Innovation management speaker notes
PPT
Mgmt forum MTC 5
PPT
Stress management
PPT
eXtreme programming
PPT
Stress
PPT
CMMi 4 techstaff
PPT
Design patterns intro
08060 c foils
Innovation management speaker notes
Mgmt forum MTC 5
Stress management
eXtreme programming
Stress
CMMi 4 techstaff
Design patterns intro

Viewers also liked (8)

PPT
SW development process and the leading indicator
PPT
Cohr managing stress training
PPT
Effective prioritization & zbb
PPT
PMC post implementation review
PPT
PMP study TTT
PPT
Diversity in thinking styles (part 1)
PPT
Pmp study: time
PPT
Unified process
SW development process and the leading indicator
Cohr managing stress training
Effective prioritization & zbb
PMC post implementation review
PMP study TTT
Diversity in thinking styles (part 1)
Pmp study: time
Unified process
Ad

Similar to Design patterns (20)

PPT
CS6201 Software Reuse - Design Patterns
PDF
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
PPT
Design Patterns.ppt
PPT
CEN6016-Chapter1.ppt
PPT
CEN6016-Chapter1.ppt
PPTX
System architecture infosheet
PPTX
Lecture-7.pptx software design and Arthitechure
PDF
Patterns Overview
PPTX
Software Design
PPT
5-CEN6016-Chapter1.ppt
PPTX
Interaction design patterns
PPTX
Designpattern
PPTX
Introduction of Object Oriented system for engineer
PPT
Object-Oriented Analysis and Design
PDF
Module 2 design patterns-2
PPT
Design pattern in android
PDF
1 modeling concepts
PPT
Chapter 02 The Object Model_Software E.ppt
PPTX
Design Pattern - Introduction
PDF
Conversational AI from an Information Retrieval Perspective: Remaining Challe...
CS6201 Software Reuse - Design Patterns
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
Design Patterns.ppt
CEN6016-Chapter1.ppt
CEN6016-Chapter1.ppt
System architecture infosheet
Lecture-7.pptx software design and Arthitechure
Patterns Overview
Software Design
5-CEN6016-Chapter1.ppt
Interaction design patterns
Designpattern
Introduction of Object Oriented system for engineer
Object-Oriented Analysis and Design
Module 2 design patterns-2
Design pattern in android
1 modeling concepts
Chapter 02 The Object Model_Software E.ppt
Design Pattern - Introduction
Conversational AI from an Information Retrieval Perspective: Remaining Challe...
Ad

Recently uploaded (20)

PDF
Interior Structure and Construction A1 NGYANQI
PPTX
CLASSIFICATION OF YARN- process, explanation
PPTX
Entrepreneur intro, origin, process, method
PDF
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
PDF
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
PPTX
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
PDF
SEVA- Fashion designing-Presentation.pdf
PPTX
Media And Information Literacy for Grade 12
PDF
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
PPT
robotS AND ROBOTICSOF HUMANS AND MACHINES
PDF
The Basics of Presentation Design eBook by VerdanaBold
PDF
Quality Control Management for RMG, Level- 4, Certificate
PDF
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
PDF
Chalkpiece Annual Report from 2019 To 2025
PPTX
DOC-20250430-WA0014._20250714_235747_0000.pptx
PPTX
2. Competency Based Interviewing - September'16.pptx
PPT
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
PDF
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
PDF
YOW2022-BNE-MinimalViableArchitecture.pdf
PPTX
rapid fire quiz in your house is your india.pptx
Interior Structure and Construction A1 NGYANQI
CLASSIFICATION OF YARN- process, explanation
Entrepreneur intro, origin, process, method
ART & DESIGN HISTORY OF VEDIC CIVILISATION.pdf
Emailing DDDX-MBCaEiB.pdf DDD_Europe_2022_Intro_to_Context_Mapping_pdf-165590...
Causes of Flooding by Slidesgo sdnl;asnjdl;asj.pptx
SEVA- Fashion designing-Presentation.pdf
Media And Information Literacy for Grade 12
Facade & Landscape Lighting Techniques and Trends.pptx.pdf
robotS AND ROBOTICSOF HUMANS AND MACHINES
The Basics of Presentation Design eBook by VerdanaBold
Quality Control Management for RMG, Level- 4, Certificate
Integrated-2D-and-3D-Animation-Bridging-Dimensions-for-Impactful-Storytelling...
Chalkpiece Annual Report from 2019 To 2025
DOC-20250430-WA0014._20250714_235747_0000.pptx
2. Competency Based Interviewing - September'16.pptx
WHY_R12 Uaafafafpgradeaffafafafaffff.ppt
Key Trends in Website Development 2025 | B3AITS - Bow & 3 Arrows IT Solutions
YOW2022-BNE-MinimalViableArchitecture.pdf
rapid fire quiz in your house is your india.pptx

Design patterns

  • 1. Design Patterns – Eran Toch Methodologies in Information System Development Design Patterns:Design Patterns: Talking in the Design LanguageTalking in the Design Language Eran Toch Methodologies in the Development of Information Systems
  • 2. Design Patterns – Eran Toch 2November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns – The Composite Pattern • Behavioral Patterns – The Strategy Pattern • Creational Patterns – The Singleton Pattern • Human Interaction Patterns – Go Back to a Safe Place • Summary
  • 3. Design Patterns – Eran Toch 3November 2003 What is a Design Pattern?What is a Design Pattern? In Short, a solution for a typical problem “a description of a recurrent problem and of the core of possible solutions.“
  • 4. Design Patterns – Eran Toch 4November 2003 Why do we need them?Why do we need them? • Problems are not always unique. Reusing existing experience might be proved useful. • We need a common language to describe problems and solutions. • The Design of Object-Oriented systems limits the scope of problems and solutions we can talk about
  • 5. Design Patterns – Eran Toch 5November 2003 History of Design PatternsHistory of Design Patterns Christopher Alexander A Pattern Language: Towns, Buildings Construction 1970’ 1995’ 2000’ Architecture Object Oriented Software Design Other Areas: HCI, Organizational Behavior… Gang of Four (GoF) Design Patterns: Elements of Reusable Object-Oriented Software Many Authors
  • 6. Design Patterns – Eran Toch 6November 2003 Structure of a design patternStructure of a design pattern • Pattern Name and Classification • Intent – a Short statement about what the pattern does • Motivation – A scenario that illustrates where the pattern would be useful • Applicability – Situations where the pattern can be used
  • 7. Design Patterns – Eran Toch 7November 2003 Structure of a design pattern – cont’dStructure of a design pattern – cont’d • Structure – A graphical representation of the pattern • Participants – The classes and objects participating in the pattern • Collaborations – How to do the participants interact to carry out their responsibilities? • Consequences – What are the pros and cons of using the pattern? • Implementation – Hints and techniques for implementing the pattern
  • 8. Design Patterns – Eran Toch 8November 2003 Classification of patternsClassification of patterns • Structural – Composite*, Decorator, Façade, Adapter… • Behavioral – Strategy*, Command, Observer, Chain of Responsibilities… • Creational – Singleton*, Abstract Factory, Factory Method… • Other – User interface Patterns • Go Back to a Safe Place
  • 9. Design Patterns – Eran Toch 9November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns • Behavioral Patterns • Creational Patterns • Human Interaction Patterns • Summary
  • 10. Design Patterns – Eran Toch 10November 2003 The Composite PatternThe Composite Pattern • Intent: – Compose objects into tree structures to represent part-whole hierarchies. – Composite lets clients treat individual objects and compositions of objects uniformly. This is called recursive composition.
  • 11. Design Patterns – Eran Toch 11November 2003 MotivationMotivation When Processing the hierarchal collection, we need to query the type of the object (composite or primitive) and act differently Diagram reference: Design Patterns [Gof]
  • 12. Design Patterns – Eran Toch 12November 2003 Composite: ApplicabilityComposite: Applicability • Use the Composite pattern when: – You want to represent part-whole hierarchies of objects. – You want clients to be able to ignore the difference between compositions of objects and individual objects. Clients will treat all objects in the composite structure uniformly.
  • 13. Design Patterns – Eran Toch 13November 2003 Composite: StructureComposite: Structure • Define an abstract base class that specifies the uniform behavior. • Subclass the Primitive and Composite classes of the Component class. Diagram reference: Design Patterns [Gof]
  • 14. Design Patterns – Eran Toch 14November 2003 Composite: ConsequencesComposite: Consequences • Benefits – It makes it easy to add new kinds of components – It makes clients simpler, since they do not have to know if they are dealing with a leaf or a composite component • Liabilities – It makes it harder to restrict the type of components of a composite
  • 15. Design Patterns – Eran Toch 15November 2003 Composite: Known UsesComposite: Known Uses 1. A GUI system has window objects which can contain various GUI components (widgets) such as, buttons and text areas. A window can also contain widget container objects which can hold other widgets. Concrete examples: Java Swing, MFC 2. Folder based file system 3. Arithmetic expressions
  • 16. Design Patterns – Eran Toch 16November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns • Behavioral Patterns • Creational Patterns • Human Interaction Patterns • Summary
  • 17. Design Patterns – Eran Toch 17November 2003 The Strategy PatternThe Strategy Pattern • Intent: – Define a family of algorithms, encapsulate each one, and make them interchangeable. – Strategy lets the algorithm vary independently from clients that use it.
  • 18. Design Patterns – Eran Toch 18November 2003 Strategy: MotivationStrategy: Motivation The client wants to use the algorithm without knowing which one to use in advance. We want to add new algorithms without changing the client class.
  • 19. Design Patterns – Eran Toch 19November 2003 Strategy: StructureStrategy: Structure • Encapsulate the behavior of the context class in a separate algorithm class. • The context class keeps a reference to the algorithm class and passes on the messages. • The algorithm class can be sub-classed to support multiple algorithms.
  • 20. Design Patterns – Eran Toch 20November 2003 Strategy: ConsequencesStrategy: Consequences • Benefits – Provides an alternative to subclassing the Context class to get a variety of algorithms or behaviors – Keeps the client clean from large conditional statements – Provides a choice of implementations for the same behavior • Liabilities – Increases the number of objects – All algorithms must use the same Strategy interface – We still need conditional statements!
  • 21. Design Patterns – Eran Toch 21November 2003 Strategy: Known UsesStrategy: Known Uses • QSIA Learning System • Layout Manager in Java Swing • Sorting algorithms, memory allocation algorithms and more…
  • 22. Design Patterns – Eran Toch 22November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns • Behavioral Patterns • Creational Patterns • Human Interaction Patterns • Summary
  • 23. Design Patterns – Eran Toch 23November 2003 The Singleton PatternThe Singleton Pattern • Intent. – Ensure a class only has one instance, and provide a global point of access to it. • Motivation. – Sometimes, an application needs one, and only one, instance of an object. For example, we want just one window manager. Or just one factory for a family of products. – We need to have that one instance easily accessible. – And we want to ensure that additional instances of the class can not be created.
  • 24. Design Patterns – Eran Toch 24November 2003 Singleton: StructureSingleton: Structure • Declare the single instance as a private static data member. • Provide a public static member function that encapsulates all initialization code, and provides access to the instance.
  • 25. Design Patterns – Eran Toch 25November 2003 Singleton: Example CodeSingleton: Example Code public class Singleton { // The private reference to the one and only instance. private static Singleton uniqueInstance = null; // An instance attribute. private int data = 0; /** * Returns a reference to the single instance. * Creates the instance if it does not yet exist. */ public static Singleton instance() { if(uniqueInstance == null) uniqueInstance = new Singleton(); return uniqueInstance; } /** * The Singleton Constructor. Note that it is private! * No client can instantiate a Singleton object! */ private Singleton() {} }
  • 26. Design Patterns – Eran Toch 26November 2003 Singleton: Example Code – cont’dSingleton: Example Code – cont’d public class TestSingleton { public static void main(String args[]) { // Get a reference to the single instance of Singleton. Singleton s = Singleton.instance(); // Set the data value. s.setData(34); System.out.println("First reference: " + s); System.out.println("Singleton data value is: " + s.getData()); // Get another reference to the Singleton. // Is it the same object? s = null; s = Singleton.instance(); System.out.println("nSecond reference: " + s); System.out.println("Singleton data value is: " + s.getData()); } } What will be the output?
  • 27. Design Patterns – Eran Toch 27November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns • Behavioral Patterns • Creational Patterns • Human Interaction Patterns • Summary
  • 28. Design Patterns – Eran Toch 28November 2003 Human Interaction PatternsHuman Interaction Patterns • A Pattern language to describe human interaction situations • Examples: – Go Back to a Safe Place – Form – Control Panel – WYSIWYG Editor – Hierarchical Set – Map of Navigable Spaces – More…
  • 29. Design Patterns – Eran Toch 29November 2003 Go Back to a Safe PlaceGo Back to a Safe Place • Problem: – How can the artifact make navigation easy, convenient, and psychologically safe for the user? • Forces: – A user may forget where they were, if they stop using the artifact while they're in the middle of something and don't get back to it for a while. – If the user gets into a space or a state that they don't want to be in, they will want to get out of it in a safe and predictable way. – The user is more likely to explore an artifact if they are assured that they can easily get out of an undesired state or space; that assurance engenders a feeling of security.
  • 30. Design Patterns – Eran Toch 30November 2003 Go Back to a Safe PlaceGo Back to a Safe Place • Solution: – Provide a way to go back to a checkpoint of the user's choice. • Examples: – The "Home" button on a Web browser – Turning back to the beginning of a chapter in a physical book or magazine – The “undo" feature on some computer applications
  • 31. Design Patterns – Eran Toch 31November 2003 AgendaAgenda • What is a Design Pattern? • Structural Patterns • Behavioral Patterns • Creational Patterns • Human Interaction Patterns • Summary
  • 32. Design Patterns – Eran Toch 32November 2003 SummarySummary • Patterns learned: – Composite, Strategy, Singleton, Go Back to a Safe Place. • Advantages of Design Patterns: – They capture expertise and make it accessible to non- experts. – Their names collectively form a vocabulary that helps developers communicate better. – They help people understand a system more quickly when it is documented with the patterns it uses.
  • 33. Design Patterns – Eran Toch 33November 2003 ReferencesReferences • Design Patterns: Elements of Reusable Object-Oriented Software, Gamma E. et el., 1995, Addison-Wesley. • A course from Bob Tarr from UMBC University http://www.research.umbc.edu/~tarr/dp/fall00/cs491.html • The Design Patterns Java Companion, James W. Cooper (an online version of the book) http://www.patterndepot.com/put/8/JavaPatterns.htm • A Site dedicated to Design Patterns by Vince Huston http://home.earthlink.net/~huston2/dp/patterns.html • Seven Habits of Successful Pattern Writers, John Vlissides http://hillside.net/patterns/papers/7habits.html • COMMON GROUND: A Pattern Language for Human- Computer Interface Design, Jenifer Tidwell, http://www.mit.edu/~jtidwell/common_ground_onefile.html
  • 34. Design Patterns – Eran Toch 34November 2003 Doesn’t it go too far?Doesn’t it go too far? • Taken from Vince Huston’s site about Design Patterns:
  • 35. Design Patterns – Eran Toch Methodologies in Information System Development Thanks!Thanks!