



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Salvage; Class: Software Design; Subject: Computer Science; University: Drexel University; Term: Fall 2008;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Many design patterns are catalogued in the Many design patterns are catalogued in the “
“Gang of Four
Gang of Four”
” text. I find their definitions not to
text. I find their definitions not to
help much unless you already understand what it says.
Thus they
help much unless you already understand what it says.
Thus they are not very helpful once
are not very helpful once
the patterns get more complex.
However, our first pattern, the
the patterns get more complex.
However, our first pattern, the Fa
Faç
çade is quite simple.
So
ade is quite simple.
So
their definition isn their definition isn’
’t too bad:
t too bad:
Provide a unified interface to a set of interfaces in a subsystem. FaProvide a unified interface to a set of interfaces in a subsyste
m. Faç
çade defines a higher level
ade defines a higher level
interface that makes a subsystem easier to use.interface that makes a subsystem easier to use.
It It’
’s really the second sentence that captures the meaning of the Fa
s really the second sentence that captures the meaning of the Faç
çade to me.
ade to me.
It It’
’s basically saying that we need a simpler way to access a comple
s basically saying that we need a simpler way to access a complex system.
x system.
It is quite often in a large company that programmers develop a It is quite often in a large company that programmers develop a specific skill that everyone
specific skill that everyone
does not know. Imagine you had to learn a CAD system. They are q does not know. Imagine you had to learn a CAD system. They are quite complex. Everyone
uite complex. Everyone
on the team shouldn on the team shouldn’
’t have to learn the details of programming in CAD. If everyone h
t have to learn the details of programming in CAD. If everyone had to
ad to
learn every detail, think of the time wasted reading all those m learn every detail, think of the time wasted reading all those manuals!
anuals!
Key Features for the Fa Key Features for the Faç
çade Pattern:
ade Pattern:
Intent: You want to simplify how to use an existing system. You Intent: You want to simplify how to use an existing system. You need to define your own
need to define your own
interface. interface.
Problem: You need to use only a subset of a complex system. Problem: You need to use only a subset of a complex system.
Solution: Create a new interface for the client to use. Solution: Create a new interface for the client to use.
Participants and Collaborators: Simplified interface for client Participants and Collaborators: Simplified interface for client
Consequences: Simplifies the us of a required subsystem, but red Consequences: Simplifies the us of a required subsystem, but reduces options.
uces options.
Implementation: Define a new class (or classes) that has the req Implementation: Define a new class (or classes) that has the required interface and uses the
uired interface and uses the
existing system. existing system.
Complexity can be greatly reduced for the application that acces Complexity can be greatly reduced for the application that accesses a fa
ses a faç
çade instead of a or
ade instead of a or
many subsystems: many subsystems: