12: Wiring Flashcards

1
Q

what is wiring?

A

two stages: discovery and binding
Discovery – which component will provide which
interfaces required, from the population available
o Binding – erforming the binding to connect the chosen
components together as decided
the process of matching each components interface to each other components
can be considered part of the

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

What is an interface?

A

The “bit that sits between” two functional components

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

what are the benefits of DI?

A

Late binding - services can be swapped with other services
Extensibility
parallel development - code can be developed in parallel
maintainability - classes with clearly defined responsibility are easier to maintain

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

what are the options for when to wire? advs and disadvs

A

at installation - clear what the behaviour will be, whats needed and whats
at start up - Find issues before any user touches the system
o Clear behaviour
o Extensible when re-started, just bind to new components as
they become available
o Subject to binding failures
dynamically - A component performs re-wiring as conditions
change
o Arbitrary logic in the re-wiring – it’s just another component
o More complex
o More flexible and extensible
o When does re-wiring occur? How is the need for it
detected? How it is accomplished by a component?

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

how is wiring specified? advs and disadvs?

A

Implicitly, by the distribution of endpoints. Bindings are made according to the way components acquire endpoints. Requires discipline to make sure there’s an overview somewhere. Potentially fragile and hard to change.
Explicitly, as a workflow. Make into a structured process. Change partners as required. Requires another process to select partners and check for available components.
o Explicitly, as code. May repidly become unstable or uncomprehensible.

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

what are the interface compatibilityt options?

A

name based - they have the smae name
structual type - interfaces respond to the same operations of messages (put: int -> int)
sub-typing and other - allow more operations, variant type signatures

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