Design Patterns and Principles Flashcards

1
Q

“Design is not just how it
looks and feels like.
Design is how it works”

A

What is Design?
● According to Steve Jobs , Cofounder
of Apple:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  • 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
A

Design

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
  • 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.
A

Design patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The pattern is not a specific piece of code,
but a __ __ for solving a
particular problem.

A

general concept

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Design patterns are often confused with
algorithms because they both describe
typical solutions (True or false)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

While an algorithm always defines a clear
set of actions that can achieve some goal, a
pattern is a more ____ of a
solution.

A

high level description

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

● 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.

A

cooking recipe, blueprint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

sections that are usually present in a
pattern description:

A

Intent
Motivation
Structure
Code Example

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

briefly describes both the problem and
the solution.

A

Intent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

shows each part of the pattern and how
they are related.

A

Structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Some pattern catalogs list other useful
details, such as:

A

applicability of the
pattern, implementation steps and
relations with other patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

further explains the problem and the solution the
pattern makes possible.

A

Motivation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

one of the popular programming languages
makes it easier to grasp the idea behind the pattern.

A

Code example

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The most basic and low level patterns are
often called ___ . They usually apply only to
a single programming language.

A

idioms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The most universal and high level patterns are_____. Developers can
implement these patterns in virtual ly any
language.

A

architectural patterns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Pattern Description 3 main groups

A

Creational patterns
Structural patterns
Behavioral patterns

16
Q

provide object creation mechanisms that
increase flexibility and reuse of existing code.

A

Creational patterns provide

17
Q

explain how to assemble objects and class es into
larger structures, while keeping the structures flexible and efficient.

A

Structural patterns

18
Q

take care of effective communication and the
assignment of responsibilities between objects.

A

Behavioral patterns

19
Q

are typical solutions to common problems in object
oriented design.

A

Patterns

20
Q

The concept of patterns was first described by __ in A Pattern Language:
Towns, Buildings, Construction

A

Christopher Alexander

21
Q

The book describes a “ for designing
the urban environment . The units of this
language are patterns.

A

A Pattern Language:
Towns, Buildings, Construction

22
Q

The idea was picked up by four authors:

A

Erich
Gamma, John Vlissides Ralph Johnson, and
Richard Helm

23
Q

In 1995, they pub lished Design Patterns: Elements of Reusable Object Oriented Software in which they applied the concept of design patterns to programming.

A

Erich
Gamma, John Vlissides Ralph Johnson, and
Richard Helm

24
Q

The book featured 23 patterns solving various
problems of object oriented design and became
a best seller very quickly.

A

Design Patterns: Elements
of Reusable Object Oriented Software

25
Q

Due to its lengthy name, people started to call it
“the book by the gang of four” which was soon shortened to simply “___”

A

the GOF book

26
Q

Since then, dozens of other object
oriented patterns have been
discovered. The “___”
became very popular in other
programming fields, so lots of other
patterns now exist outside of object
oriented design as well.

A

pattern approach

27
Q

are a toolkit of tried and tested solutions to
common problems in software design.

A

Design patterns

28
Q

define a common language that you and your
teammates can use to communicate more efficiently.

A

Design patterns