Lesson 6 Flashcards

(39 cards)

1
Q

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

A

Steve Jobs

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

Design is the ______ of an experience.

A

creation

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

It’s also the _______ of the said creation and how well it’s
organized.

A

process

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

On top of that, design is the _____, i.e. the things we see,
hear, and feel.

A

result

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

There is no definite meaning for design, but to summarize
it, Design is a ______________ in such a way as
best to ___________________

A

plan for arranging elements, accomplish a particular purpose

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

are typical solutions to
commonly occurring problems in software
design.

A

Design patterns

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

They are like _____________ that you
can customize to solve a recurring design
problem in your code.

A

pre-made blueprints

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

_________ is a cooking recipe, where each
step is required to achieve a goal.

A

Algorithm

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

always defines a clear
set of actions that can achieve some goal,

A

Algorithm

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

is a more high-level description of a
solution.

A

pattern

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

Design pattern is a _______, where the
results are visible, but the implementation is
up to you.

A

blueprint

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

of the pattern 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
14
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
15
Q

of classes 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
16
Q

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

17
Q

The most universal and high-level patterns are
_______________. Developers can
implement these patterns in virtually any
language.

A

architectural patterns

17
Q

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

18
Q

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

A

Creational patterns

19
Q

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

A

Structural patterns

20
Q

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

A

Behavioral patterns

21
Q

aren’t obscure, sophisticated concepts—quite
the opposite.

A

Design patterns

22
Q

are typical solutions to common problems in object-
oriented design.

23
Q

The concept of patterns was first described by

A

Christopher Alexander in A Pattern Language:
Towns, Buildings, Construction.

24
The book describes a ________________. The units of this language are patterns.
“language” for designing the urban environment
25
The idea was picked up by four authors:
Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm
26
In 1995, they published _______________________, in which they applied the concept of design patterns to programming.
Design Patterns: Elements of Reusable Object-Oriented Software
27
Due to its lengthy name, people started to call it ________________ which was soon shortened to simply __________.
“the book by the gang of four” “the GOF book”.
28
Design patterns are a toolkit of _____________ solutions to common problems in software design.
tried and tested
29
SOLID is a mnemonic for _____________ intended to make software designs more understandable, flexible and maintainable.
five design principles
30
___________ introduced them in the book Agile Software Development, Principles, Patterns, and Practices
Robert Martin
31
Using these principles mindlessly __________________. The cost of applying these principles into a program’s architecture
can cause more harm than good.
32
A class should have just one reason to change. Try to make every class responsible for a single part of the functionality provided by the software, and make that responsibility entirely encapsulated by (or hidden within) the class. The main goal of this principle is reducing complexity The real problems emerge when your program constantly grows and changes. At some point classes become so big that you can no longer remember their details.
Single Responsibility Principle
33
Classes should be open for extension but closed for modification. The main idea of this principle is to keep existing code from breaking when implementing new features. A class is open if you can extend it, produce a subclass and do whatever you want with it—add new methods or fields, override base behavior, etc. A class is closed (or complete) if it’s 100% ready to be used by other classes—its interface is clearly defined and won’t be changed in the future.
Open/Closed Principle
34
When extending a class, remember that you should be able to pass objects of the subclass in place of objects of the parent class without breaking the client code. This principle is named by Barbara Liskov, who defined it in 1987 in her work Data abstraction and hierarchy
Liskov Substitution Principle
35
Clients shouldn’t be forced to depend on methods they do not use. Try to make your interfaces narrow enough that client classes don’t have to implement behaviors they don’t need.
Interface Segregation Principle
36
● High-level classes shouldn’t depend on low-level classes. Both should depend on abstractions. ● Abstractions shouldn’t depend on details. Details should depend on abstractions.
Dependency Inversion Principle
37
implement basic operations such as working with a disk, transferring data over a network, connecting to a database, etc.
Low-level classes
38
contain complex business logic that directs low-level classes to do something.
High-level classes