Unit 9 Flashcards

1
Q

Suggest a reason why choosing the architecture very late on might be a bad idea.

A

Choosing the architecture at a very late stage suffers from the risks of the waterfall approach. By then many other design decisions will have been taken and it will be too late to change them, even if they force us to adopt an architecture that is less than ideal.

An analogy could be with building a house. Would anyone dream of starting construction without an architectural design for the building?

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

What are the four ‘architecturally significant requirements’ (ASRs) identified by Chen et al. (2012)?

A
  • Quality attributes are non-functional requirements such as security, reliability, availability, usability, maintainability, portability and so on.
  • Core features are described by Chen et al as ‘the problem the software is trying to solve’.
  • Constraints. Here the authors refer to technical constraints – for example, the client may have specified a particular programming language – or non-technical constraints such as budget or time.
  • Application environment. This is the environment in which the system will run. For example, a navigation app will need GPS connectivity.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is meant by a stakeholder concern?

A

A concern is some aspect of the system that is of crucial importance from the point of view of one or more groups of stakeholders. Concerns can be to do with the system’s functionality or with qualities such as correctness, performance, security and so on.

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

In software architecture, what is meant by a viewpoint?

A

It is the set of conventions and models appropriate to a particular view. You can think of a viewpoint as the language that is used to document a specific type of view.

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

List four examples of architectural styles.

A

Client-server architecture.
Layered architecture.
Pipe-and-filter (Data flow) architecture.
Peer-to-peer architecture.

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

Think of some reasons why reuse is desirable.

A
  • It avoids duplication of effort and reinventing already existing solutions, which saves resources.
  • It promotes reliability because developers can use tried and trusted solutions.
  • It speeds up development because developers can take existing solutions without starting from the beginning every time.
  • It is a mechanism for spreading good practice among the software development community and familiarising practitioners with tried and tested solutions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the various ingredients that make up a framework?

A

A framework consists of an architecture, a small amount of software for the framework, a set of components suitable for use within the framework and the documentation needed to make use of the framework.

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

List three forms of reuse and briefly describe what is reused in each case.

A

Architectural styles reuse expertise in large-scale architectural design – the types of component used and the patterns of interaction between them.

Frameworks reuse a particular architecture and a set of software components suitable for use within it.

Product lines reuse reference architectures, software components and expertise about the variations needed to fulfil customer requirements.

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

What is the difference between generalisation and realisation?

A

Generalisation expresses a subtyping relationship between two classes. The subclass is a specialised subtype of its superclass and inherits the attributes and operations defined by the superclass.

Realisation is not a subtyping relationship but instead expresses the fact that a class provides an implementation for all the operations specified by an interface.

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

Discuss possible advantages of separating the user interface from the domain logic.

A
  • The user interface is not affected by changes in the implementation of the business logic.
  • The same domain logic can be used with different user interfaces.
  • The business logic can be tested separately from the interface logic.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Where in the hotel case study might you use a singleton?

A

You could use a singleton instance of HotelChain as a system object that all messages from the user interface are sent to.

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

Suggest some quality requirements that the Factory pattern might help satisfy.

A

Maintainability and portability (and flexibility if it is counted as distinct from maintainability).

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

Give four examples of a design pattern.

A

Singleton.
Factory.
Observer.
Model-view-controller.

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

What is the purpose of the model-view-controller (MVC) pattern and when would you use it?

A

It separates the user interface interaction into three distinct roles: the model of the domain, the view representing that domain, and the controller of changes to the domain.

You would use it when you have a user interface that you want kept separate from the model, for example when an application needs to be used across different platforms.

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

What is the purpose of the Observer pattern and when would you use it?

A

When partitioning a system into individual classes you want the coupling between them to be loose so you have the flexibility to vary them independently. But a mechanism is needed to ensure that when the state of an object changes related objects are updated to keep them in step.

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

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

What is the purpose of the Singleton pattern and when would you use it?

A

In many cases only a single instance of a class is required and allowing creation of more than one instance would compromise the design of the system.

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

17
Q

What is the purpose of the Factory pattern and when would you use it?

A

If the creation and initialisation of an object is complex and liable to change, making clients responsible for the task introduces an undesirable level of coupling. Encapsulating the creation in a dedicated factory class hides the details from the client and reduces the coupling.

You would use it whenever object creation and initialisation is complex or depends on information that clients may not know or is likely to change.