Design Patterns and Principles Flashcards
“Design is not just how it
looks and feels like.
Design is how it works”
What is Design?
● According to Steve Jobs , Cofounder
of Apple:
- is the creation of an experience.
- It’s also the process of the said creation and how well it’s
organized. - On top of that, design is the result , i.e. the things we see,
hear, and feel. - is a plan for arranging elements in such a way as
best to accomplish a particular purpose
Design
- are typical solutions to
commonly occurring problems in software
design. - They are like pre made blue prints that you
can customize to solve a recurring design
problem in your code.
Design patterns
The pattern is not a specific piece of code,
but a __ __ for solving a
particular problem.
general concept
Design patterns are often confused with
algorithms because they both describe
typical solutions (True or false)
True
While an algorithm always defines a clear
set of actions that can achieve some goal, a
pattern is a more ____ of a
solution.
high level description
● Algorithm is a __ , where each
step is required to achieve a goal.
● Design pattern is a ___ , where the
results are visible, but the implementation is
up to you.
cooking recipe, blueprint
sections that are usually present in a
pattern description:
Intent
Motivation
Structure
Code Example
briefly describes both the problem and
the solution.
Intent
shows each part of the pattern and how
they are related.
Structure
Some pattern catalogs list other useful
details, such as:
applicability of the
pattern, implementation steps and
relations with other patterns
further explains the problem and the solution the
pattern makes possible.
Motivation
one of the popular programming languages
makes it easier to grasp the idea behind the pattern.
Code example
The most basic and low level patterns are
often called ___ . They usually apply only to
a single programming language.
idioms
The most universal and high level patterns are_____. Developers can
implement these patterns in virtual ly any
language.
architectural patterns