Design Patterns I Flashcards

1
Q

Which are the basic elements of a DP

A
  • Name
  • Problem
  • Solution
  • Consequences
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does the problem describe?

A

When to apply the pattern and its context

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

Does patterns universally apply easily for any situation and tech?

A

No, these abstractions can be more difficult in some languages than others and came across with trade offs.

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

Does patterns are actually recipes for your problems?

A

No, they are more like templates that has to customize and later implement

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

What format does the GoF used to describe patterns

A
  • Name
  • Classification
  • Intention
  • Also known as
  • Motivation
  • Applicability
  • Structure
  • Participants
  • Collaboration
  • Consequences
  • Implementation
  • Sample
  • Known uses
  • Related Patterns
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the “Intention” of a DP

A

The problem that is trying to resolve and how does it

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

What is the “Motivation” of a DP

A

Bad design decision scenario that might make this pattern to born

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

What is the “Applicability” of a DP

A

How can you recognize scenarios where there are bad design decision where u can apply the pattern, and other scenarios where you can apply it.

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

What is the “Structure” of DP

A

Visual representation of how participants communicate

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

What are “Participants” and “Collaborations”

A

The participants are the classes that have a responsibility inside the pattern and collabs are how they request and communicate between they.

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

What is the “Implementation” of DP

A

The pitfalls, trade offs and techniques. Including problems with specific languages.

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

Which are some patterns ing the GoF books (at least mention 6)

A
  • Abstract factory
  • Factory
  • Bridge
  • Adapter
  • Builder
  • Chain of responsability
  • Mediator
  • Proxy
  • Singleton
  • Iterator
  • Command
  • Facade
  • Decorator
  • Observer
    -Prototype
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How are DP classified by purpose?

A
  • Structural
  • Behavioral
  • Creational
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How are DP classified by scope?

A

Classes (inheritance) and Objects (mostly composition and can be rewired at runtime)

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