COMP2007-Architectural patterns Flashcards

0
Q

Model View Controller

A

Problem:
separation of UI from application

Context:
interactive applications with a flexible UI

Solution:
system model: UI (View and Controller component) decoupled from the application (Model component)

  • components: collections of procedures (module)
  • connectors: procedure calls
  • control structure: single thread
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

Definition

A

Describes a family of architectures in terms of their structural organisation.

Means of representing, sharing and reusing knowledge.

When uselful and when not

Can be represented using tabular and graphical descriptions.

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

MVC - Model-View-Controller

A

Separates
presentation and
interaction from
system data.

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

The model component

A

Manages system data and associated operations on that data.

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

The view component

A

Defines and manages how the data is presented to the user.

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

The controller component

A

manages user interaction and passes these to the view and the model.

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

Mvc is used

A

When there are multiple ways to view and interact with the data

Also when future requirements for interaction and presentation of data are unknown.

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

Advantages of MVC

A

Allows data to change independently of its representation and vice versa

Supports presentation of the same data in different ways with changes made in one representation shown in all of them.

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

Disadvantages of MVC

A

Can involve additional code and code complexity when the data model and interactions are simple.

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

Layered pattern

A

Problem
- distinct, hierarchical classes of services

Concentric circles of functionality

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

Layered pattern context

A

A large system that requires decomposition (eg virtul machines, OSI model)

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

Layered pattern solution

A
  • system model:
    hierarchy of layers, often limited visibility
  • components:
    collections of procedures (module)
  • control structure: single or multiple threads
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Layered architecture

A

Used to model the interfacing of sub-systems

Organises the system into a set of layers (or abstract machines) each of which provide a set od services

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

Layered architecture cont…

A

Supports incremental development of sub-systems in different layers

When a layer interface changes, only the adjacent layer is affected.

It is however, often artifici to structure systems in this way.

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

Layered architecture pattern

Description

A

Organises the system into layers with related funtionality associated with each layer

A layer provides services to the layer above it so the lowest-lecel layers represent core services that are likely to be used throughout the system.

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

Layered architectural pattern

When used

A

When building new fa ilities on top of existing systems;

when the development is spread accross several teams with each team responsible for a layer of functionality

when there is a requirement for multi-level security

16
Q

Layeres architecture pattern

Advantages

A

Allows replacement of entire layers so long as the interface is maintained

Redundant facilities can be provided in each layer to increase the dependability of the system

17
Q

Layered architecture pattern

Disadvantages

A

In practice difficult to provide a clean separation btwn layers

High level layer might have to interact directly with lower level rather than thru one between

Performance a prob cause od multiple levels of interpretation of a service requwst as it is processes at each layer.

18
Q

Repository pattern

Description

A

All data in system managed in a central repository accessible to all sys components which do not ibterCt directly, only through the repository.

19
Q

Repository pattern

A

.

20
Q

Repository pattern

Advantages

A

Components can be independent - they do not need to know of the e istence of other components.

Changes made by one component can be propagated to all components.

All data can be managed consistently (backups) as it is all in one place.

21
Q

Repository pattern

Disadvantages

A

As a single point of failure any probs can affect the whole system.

May be inefficiencies in organising all communication through the repository.

Distributing the repository across several computers may be difficult.

22
Q

Client server architecture

Description

A

Functionality of the system organised into services wirh each service delicered from a separate server. Clients are users of these services and access servers to make use of them.

23
Q

Client server architecture patern

When used

A

When data in a shared database has to be accessed from a range of locations. Because servers can be replicated, may also be used when the load on the sys is variable.

24
Q

Client server architecture pattern

Advantages

A

Servers can be distributed across a network.

General functionality (printing) can be a available to all clients and does not need to be implemented by all services.

25
Q

Client server architecture pattern

Disadvantages

A

Each service is a single point of failure so susceptible to denial of service attacks of server failure.

Performance may be unpredictable as it depends on the network as wekk as the system.

May be management problems if servers are owned by different organisations.

26
Q

Pipe and filter architecture pattern

Description

A

Processing of data in system is organised so tjat each processing component (filter) is discrete and carries out one type of data transformation.

The data flows (as in a pipe) from one component to another for processing.

27
Q

Pipe and filter architecture pattern

When used

A

In data processing applications where inputs are processed in separate stages to generate related outputs.

28
Q

Pipe and filter pattern

Advantages

A

Easy to understand and supports transformation reuse.

Workflow style matches the structure of many business processes.

Evolution by adding transformations is straightforward.

Can be implemented as either sequential or concurrent system.

29
Q

Pipe and filter architecture pattern

Disadvantages

A

Format for data transfer has to be agreed upon between communicating transformations.

Each transformation must parse its input and un-parse its output to the agreed form. This increases sys overhead and may mean its impossible to reuse functional transformations that use incompatible data structures.

30
Q

Architecture validation

Aim

A

Increase confidence of the design tem that the architecture is fit for purpose.

Has to be achieved within constraints of time and budget.

Be rigorous & efficient as poss.

31
Q

Architecture validation

Challenges

A

Design can’t be executed or tested.

May consist of new and COTS components that have to be integrated.

32
Q

Architecture validation

Techniques

A

Questioning; how does sys react to various situations; often make use of scenarios.

Construction of a prototype that creates a simple archetype of a desited application.

Measuring; quantitive measures, archit. metrics, simulation etc.

Identify potential flaws Nd improve b4 implementation.

Cheaper to fix before built