Lecture 11 Flashcards
When talking about software architecture, what are we talking about?
Non-functional requirements
What 2 choices do you have when talking about the your architecture diagram?
- facilitating a discussion about the system design
- documenting (precisely) an architecture
Architectural design is a creative process, some other connected concepts are:
Architectural styles: high-level abstractions, guiding the overall organisation of a system
(client/server, pipes and filters)
Architectural patterns: detailed solutions to recurring architectural problems within a specific style.
(model-view-controller)
Design patterns: specific solutions to recurring design problems at a lower level than architectural patterns
(adapter, compososite)
What are pipes and filters architecture?
- Functional transformations process inputs to produce outputs.
- Variants of this approach are very common.
- Not really suitable for interactive systems.
What is layered architecture?
Models the interface of sub-systems
Organises the system into a set of layers, each provide a set of services
If a layer is changes, only the adjacent layer is affected
It can be artifical to structure systems in this way
Pipes and filters architecture, describe each of these:
Description, example, when used, advantages, disadvantages
Description: The data flows (as in a pipe) from one component to another for processing. The processing of the data in a system is organized so that each processing component (filter) is discrete and carries out one type of data transformation.
Example: Pic
When used: Commonly used in data processing applications.
Advantages: Easy to understand and supports transformation reuse. Workflow style
matches the structure of many business processes.
Disadvantages: The format for data transfer has to be agreed upon between
communicating transformations. Each transformation must parse its
input and unparse its output to the agreed form.
Layered architecture, describe each of these:
Description, example, when used, advantages, disadvantages
Description: It sorts the system into layers, where each layer handles specific tasks and helps the one above it. The bottom layers offer essential services used across the whole system.
Example: A layered model of a system for sharing copyright documents held in different libraries
When used: Adding new features to existing systems, when multiple teams handle different parts of the project and there’s a need for strong security at various levels.
Advantages: Swapping out whole layers while keeping the interface intact. Allows for redundant features like authentication in each layer, boosting the system’s reliability.
Disadvantages: Cleanly separating layers can be tough. Sometimes, a higher layer must directly engage with lower layers instead of the immediate one below it. Impacts performance due to multiple interpretations of service requests across the layers.
MVC (Model-View-Controller), describe each of these:
Description, example, when used, advantages, disadvantages
Description: Separates presentation and interaction from the system data. The system is
structured into three logical components that interact with each other.
Example: Her
When used: Used when there are multiple ways to view and interact with data. Also used
when the future requirements for interaction and presentation of data are
unknown.
Advantages: Allows the 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.
Disadvantages: Can involve additional code and code complexity when the data model andinteractions are simple.
What are the purpose of the design pattern: Composite?
- Compose objects in recursive tree structures to represent whole/part hierarchies
- Allow clients to treat both complex as well as single/simple objects in the same uniform way
- It is a nice pattern
What is MVC (model-view-controller)?
MVC is an architectural pattern. It separates an application into 3 components.
Model: models the data
View: views the data
Controller: Controls the data
Explain how this example demonstraites composite? here
What makes the Group class in your diagram a Composite is:
Hierarchical Structure: It can contain other Shape objects, including other Group objects, thus forming a tree structure. Each Group can be a node that has children, and those children can be leaf nodes (like Point, Line, Circle) or other composite nodes (other Groups).
Uniformity: The Group class implements the same Shape interface as its components, which means you can use the Group in the same way you use a single Shape. This is the essence of the Composite pattern - you don’t need to know whether you’re working with a simple shape or a complex composition of shapes; you interact with them through the same interface.
Recursive Composition: A Group can hold other Group objects, allowing for the recursive composition of shapes. This recursion is a hallmark of the Composite pattern and enables the creation of complex structures.
What are design patterns?
Describe the best practices, good design and capture experience so others can reuse this experience.