Principles Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Don’t Repeat yourself

A

Every piece of knowledge should have a single unambiguous representation in the system.

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

Single Responsibility Principle.

A

Class should have only 1 reason to change

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

Law of Demeter.

A

Law of multiple dots. Do not entangle a method with another objects’ dependencies.

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

Tell Don’t Ask.

A

Tell object what should be done rather than querying objects.

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

Composition over inheritance.

A

Prefer composition unless inheritance is strongly needed.

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

Open/Closed Principle.

A

Software entities should be open for extension but closed for modification.

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

Dependency Inversion Principle.

A

High-level modules should not depend on low-level modules. Both should depend on abstractions

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