Unit 9 Flashcards

1
Q

Draw a state pattern class diagram for a retractable ball point pen.

A

(TMA03, Q2)

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

What is the client-server architectural style?

A

Client-server is an architectural style in which one component (the server) waits for requests from other components (clients), processes each one as it is received, and returns a response to the client.

(b3, p21)

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

What is the call-return architectural style?

A

Call-return is an architectural style in which a component (the caller) makes a procedure call to another component (the callee), and waits for the call to return.

(b3, p22)

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

What is the layered architectural style?

A

Layered is an architectural style in which the system is structured as a series of layers that are visualised as being stacked on top of another. Each layer uses services provided by the layers below (usually only the layer immediately below). It also supplies services to the layer above.

(b3, p22-23)

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

What is the peer-to-peer architectural style?

A

Peer-to-peer is an architectural style similar to client-server, however all components are both clients and servers.

(b3, p23-24)

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

What is the data flow (pipes and filters) architecture style?

A

Data flow is an architectural style in which components are objects or small independent subprograms (filters) that process a stream of data and pass the results on to other components for further processing.

Communication is unidirectional and uses fixed channels. Each filter has no knowledge of other filters upstream or downstream, but simply accepts the data, processes it and passes it on.

The connectors are services, provided by the operating environment, that ‘pipe’ data from one filter to another.

(b3, p24)

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

What is the data-centred architecture style?

A

Data-centred is an architectural style in which there is a data provider that is a centralised store of persistent data. The structure of the data, the types of items and their relationships are stable and change rarely or not at all.

There are many clients who are data consumers. Items can be created, queries, updated and destroyed on request. The central store may be duplicated, to provide backup in case of failure or to deal with a greater volume of client requests. The communication channels are normally fixed.

(b3, p24)

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

What are the two forms of data-centred architecture?

A
  1. Database (or repository) - Communication is always initiated by clients and the store simply responds to requests. Typically the components are a database server and clients that access it. The connectors are database queries made via a special database connection.
  2. Blackboard - The store is active and informs users of changes, so that communication may be initiated from either end.

(b3, p24-25)

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

What is the independent components architecture style?

A

Independent components is an architectural style in which components execute concurrently and are decoupled as far as possible, but can communicate by messages that allow them to exchange data or coordinate their operations.

The connectors are the message exchange protocols, which are normally asynchronous (the sender can continue without waiting for a response).

(b3, p25-26)

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

What is the service-oriented architecture style?

A

Service-oriented is an architectural style in which there are two kinds of component - consumers and providers. A set of service providers makes services available to a set of service consumers. Consumers can combine services in order to carry out business processes.

The connectors are the requests and responses sent between conumers and providers, using standard communication protocols.

In some cases an enterprise service bus (ESB) is used, which supports features such as service look-up and routing of service requests.

(b3, p26)

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

What is the notification (publish-subscribe) architecture style?

A

Notification is an architectural style in which the two kinds of components are observers (subscribers) and subjects (publishers). Observers can register themselves with a subject in order to be kept notified whenever some particular event happens at the subject’s end.

(b3, p27)

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

What is a framework?

A

A framework is a segment of architecture and code that can be reused in different systems.

(b3, p27)

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

What four things make up a framework?

A
  1. An architecure
  2. A small amount of software for the framework
  3. A set of components suitable for use within the framework
  4. The documentation needed to make use of the framework

(b3, p29)

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

What are the 8 steps of the product-line process?

A
  1. Product-line initiation
  2. Domain analysis
  3. Architecture specification
  4. Component collection
  5. Specific-requirements capture
  6. Architecture specialisation
  7. Component selection and specialisation
  8. Integration and release

(b3, p28-29)

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

What is the twin-peaks model?

A

The twin-peaks model develops requirements and architecture concurrently and iteratively.

It gives equal prominence to requirements and architecure and uses an extension of the spiral process.

As the peaks are descending, requirements and architecture are alternately considered.

Each successive iteration specifies both requirements and architecture in greater detail.

(b3, p11)

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

What is the adapter design pattern?

A

The adapter design pattern uses inheritance and composition in order to provide an interface between two classes.

It allows a client to use a class that has a different interface from the one the client is expecting by introducing an Adapter class.

The Adapter class provides the interface the client expects, but forwards client requests to an object of the class with the incompatible interface.

(b3, p36)

17
Q

When would you use the adapter design pattern?

A

You would use the adapter design pattern when you want to use a class with a client that is expecting a different interface from the one the class provides.

​(b3, p36)

18
Q

What is the model-view-controller (MVC) design pattern?

A

The model-view-controller (MVC) design pattern splits user interface interaction into three distinct roles - the model, the view, and the controller.

The model corresponds to an object with some information about the domain. It contains data and behaviour and is not directly accessible to the user.

The view is the representation of the model in the user interface. It displays the output from the system.

The controller handles all user inputs that affect the model.

​(b3, p38)

19
Q

When would you use the model-view-controller design pattern?

A

You would use the model-view-controller design pattern when you have a user interface that you want kept separate from the model.

​(b3, p38)

20
Q

What are the three advantages of the model-view-controller design pattern?

A
  1. Separation of concerns (user interface is not affected by changes in business logic implementation)
  2. Facilitating testing (business logic can be tested separately)
  3. Flexibility (same domain logic can be used with different user interfaces)

(b3, p39-40)

21
Q

What is the observer design pattern?

A

The observer pattern reduces coupling between classes by using a mechanism to ensure related objects are kept aware of state changes.

The pattern is similar to the notification (publish-subscribe) architecture pattern, having one object in the role of the subject (or publisher) and one or more other objects in the role of observers (or subscribers).

Observers register themselves with a subject and are notified when the state of the subject object is changed, so they can update themselves.

(b3, p40-41)

22
Q

When would you use the observer design pattern?

A

You would use the observer design pattern when different parts of a system have to be kept in step with one another without being too tightly coupled.

(b3, p41)

23
Q

What is the singleton design pattern?

A

The singleton design pattern restricts a Singleton class to a single instance for cases when multiple instances would compromise the design of the system.

A Singleton class restricts use of constructors, instead being responsible for creating its own unique instance, and providing a public operation getInstance() that allows clients to access this instance.

(b3, p43)

24
Q

When would you use the singleton design pattern?

A

You would use the singleton design pattern when there must only be one instance of a class. Often this is associated with some global resource that other classes need access to.

(b3, p44)

25
Q

What is the factory design pattern?

A

The factory design pattern allows complex creation and initialisation of objects by encapsulating details of the creation in a dedicated factory class, reducing coupling.

(b3, p45)

26
Q

When would you use the factory design pattern?

A

You would use the factory design pattern whenever object creation and initialisation is complex, or depends on information that clients may not know, or is likely to change.

(b3, p45)

27
Q

What is the factory method design pattern?

A

The factory method design pattern is similar to the factory design pattern, in that it allows complex creation and initialisation of objects by encapsulating details of the creation in a dedicated factory.

However ,in the factory method design pattern, the client may not know the actual class of the product, only its interface, so all interaction is done via interfaces, leaving the factory to decide which class is appropriate.

(b3, p48)

28
Q

When would you use the factory method design pattern?

A

You would use the factory method design pattern whenever object creation and initialisation is complex and the decision about what concrete product to create needs to be deferred.

(b3, p48)