Software Design Flashcards
What are the three elements used in architectural style?
components - the basic building blocks
connectors - the way the components interact
context - how the elements and their interactions are
organised and scheduled at run-time
Describe the call-and-return architectural style?
Order of computation with only a single thread of control (no concurrency).
Systems of this form have structures which are organised around computational tasks, with these often being sub-divided into sub-programs.
Describe the interacting-processes architectural style?
Communication patterns among independent, usually concurrent, processes.
Systems are non-deterministic in their behaviour, since the scheduling (sequencing) of system elements is performed by separate, independent computers.
Describe the data-centered-repository architectural style?
A dominant central data store that is manipulated by independent computations.
Systems of this form are centred around the issues relating to data access (they are not necessarily databases). So data is at the focus.
Describe the data-sharing architectural style?
Such systems are dominated by the direct sharing of data between the components.
The key distinction between this form and the data- repository style is that the data may be distributed between many elements, but these share a common form of ‘representation’ for using and sharing this data.
What is a pattern?
- Describes a specific problem which often reoccurs in our environment and then describes the core of the solution.
- Focus is on reuse of concepts rather than code.
What are the three levels of abstraction in which patterns are used and describe them.
Architectural patterns - provide templates that describe architectural forms.
Design patterns - concerned with the organisation of classes and objects
Idioms - are language-specific forms.
Describe the architectural pattern Model View Controller.
Model - contains the core functionality and data.
Views - display information to the user.
Controllers - handle user input.
User Interface is made up of views and controllers. It is independent to the model.
The model needs to propagate information about changes to the controllers.
What are the three types of design pattern purposes?
- Creational
- Structural
- Behavioural
Describe the design pattern ‘Proxy’.
Problem:
Addresses problem where direct provision of access to an object presents a significant overhead.
Solution:
Provide a representative of the object (a proxy) and let the client object communicate with the proxy rather than with the real object. When necessary, the proxy will organise creation or deletion of the ‘real’ object.
Describe the design pattern ‘Observer’.
Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Describe the design pattern ‘Abstract Factory’.
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.
What are design anti-patterns?
Design anti-patterns describe “obvious, but wrong, solutions to recurring problems”.
Focus tends to be on why wrong solutions are adopted, rather than their form.