1: Basic Flashcards
What is coupling? Give examples of good and bad coupling
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
Why is complexity a problem? How do we build systems to cope?
- 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
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
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
what is an interface definition language? (IDL) why might you want an language-independent IDL?
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
what is a component framework
“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 is CT different to OO? how are they simiular?
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