finalset Flashcards

1
Q

What is a service, in like service oriented architecture
https://refactoring.guru/design-patterns/behavioral-patterns
– > bro just read this site lol

A

loosely coupled, reusable software describes some discrete func

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

web service

A

distributed, access by code

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

What are the Service Oriented Design Principles

A

Well defined Interface (describe the service well for custs)

Loose Coupling (i don’t know how stripe works, idc)

Separation of Concerns

Reusable

Coarse Grained

Sherlock appears with a BIG SMILE as a waiter
but john and mary are miffed and turned away from each other at the table
Sherlock says ‘it’s me’ john says ‘i don’t care… sherlock’
Sherlock’s mustache falls into the champagne, he puts it back on
‘FUCK YOU SHERLOCK’ says john, who turns out to be anakin skywalker, blasting his face with sand

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

What is Observer Design Pattern

A

exchange_websockets

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

What is the Command Pattern

A

Like
Create Order instance order = Order()
Create Stock instance stock = Stock()
Create Buy instance orderType = Buy()
then command all the sequences, together, q dumb

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

What is the Prototype Pattern

A

if there’s already an existing object like this:
Car carA = new Car();
carA.brand = ‘bugatti’;
// brand and color are not in the constructor, tough stuff

and we wanna copy the object, we’d have to do

Car carB = newCar();
carB.brand = carA.brand;
// so tiresome… ugh. imagine having to do many of these

prototype will say, okay there’s a prototype class now,
and that’ll make sure that all the attrs are copied over
also, prototype class is everyone’s zaddy, so you’re all prototypes :)

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

What is the Factory Pattern

A

imagine the whole cooking crew right in the middle of the restaurant right there combining this set of ingredient and that set of ingredient (messy conditionals) right in the open and the customers grossed out watching this

now, we have a new object (factory/kitchen), we put them there, with their conditionals.

and then when someone needs a burger you put a nice getBurger() slip inside the kitchen window, and out pops a burger

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

What are the mid level design patterns

A

broker
facade
mediator (airplanes, runway)
adaptor
proxy

generator
factory
singleton
prototype

reactor
command
observer

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

blackboard

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

repository

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

bridge

A

remote controller to tv

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