1: Basic Flashcards

1
Q

What is coupling? Give examples of good and bad coupling

A

The degree of interaction between different functional units.
Good: A depends on B
Bad: A depends on B doing its job in a particular way
Worse: A depends on B having a bug || A depends on B but nobody knows

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

Why is complexity a problem? How do we build systems to cope?

A
  • System can become to complex to understand
  • those who understand can leave/retire/die
  • so the system becomes fragile

systems need to built in such a way that they can grow in a controlled fashion

use common, stable interfaces: keep macro level the same, change the micro-level

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

what is a component?

A

a unit of composition of a system that provides a single, encapsulated function.

similar to an object in an OO program but with a defined role within the system

has explicit dependancies on its context

allows for piecewise upgrades e.g. dont have to change the wiring in the house to change the lightbulbs

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

A software component is a unit of composition
with contractually-specifed interfaces and only
explicit dependencies on its context

define:

unit of composition
interface
explicity dependnacies

A

Unit of composition: we compose components and
don’t look inside them

Interfaces: only access the services of the
component through well-known operations

Explicit dependencies: component makes known
the interfaces, services and components it requires,
and only requires these to function properly

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

what is an interface definition language? (IDL) why might you want an language-independent IDL?

A

a language used to define a component’s API.

can be the same as a programming language i.e java interfaces

can be lagnguage independant, mapped to different programming languages

there are tradoffs to a LIIDL

  • more flexible, can write components in the most suitable language
  • more complex for programmer, needs to know the language and the IDL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a component framework

A

“Harness” within which to deploy the components

e.g facebook, individual posts and apps for it are provided elsewhere (even by 3rd parties)

components can aquire communications via the framework

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

how is CT different to OO? how are they simiular?

A

objects define an interface to an encapsulated staete
clients acecss the state and its functions only through the interface

but components are more…

they have dynamic composistion and recomposistion
often multi-language

OO:
a single code base with no predefined structure for applications
dependencies can be hard to find
once compiled, doesn’t change

components
multiple sources structure within a framework
explicit interfaces and binding
dynamically changing of component instances

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