Software Architecture Exam Flashcards
(46 cards)
Define rigidity design smell.
It is characterized by resistance to change.
Even small changes are difficult.
For example large number of global vars and a lot of dependencies across the system.
Define fragility design smell.
Is vulnerability to breaking.
Changes can lead to cascading effects often in unexpected places.
Bugs are hard to locate.
Define immobility design smell.
Difficulty to “move” the code, so the problem with reusability in other places.
High complexity with a lot of tight coupling.
Define viscosity design smell.
The software’s viscosity —it’s easier to introduce changes that break the intended design than those that keep it—encourages bad solutions.
Viscosity of the environment - same but for processes for example long compilation times.
Define needless complexity design smell.
Inclusion of complex unnecessary design elements - to cover potential future needs.
This is ok when designing an application framework but otherwise it breaks agile principles.
Define needless repetition design smell.
Repetition of similar parts of the code with missed abstraction - the same change has to be done in multiple places.
Define opacity design smell.
The module becomes harder to understand as time passes - bad readability.
Define Single-Responsibility Principle.
A class should have only one reason to change - a single responsibility.
This makes the system less coupled, such as in class drawing GUI and calculating area.
Define Open–Closed Principle.
The software should be open for extension but closed for modification.
The existing code can have its functionality extended without changing it.
Strategy and template method patterns.
Needs to be balanced so as not to have the necessary complexity.
Define Liskov Substitution Principle.
Subtypes should be substitutable for their base types.
So functions handling base types can also handle subtypes without knowing about the specifics.
Define Depency-Inversion Principle.
High level modules should not depend on low level modules - both should depend on abstractions.
Abstraction should not depend on details and details should depend on abstractions.
Breaks the direct dependencies of higher levels, but not the lower levels.
Define Interface-Segregation Principle.
Clients should not be forced to depend on methods that they do not use.
Many specific interfaces over one generic “fat” one.
Define Reuse-Release Equivalence Principle
Anything intended for
reuse must also be properly released and tracked.
Human-centered - design responsibilities, including ensuring maintenance, providing notifications of future changes, offering users the option to
refuse new versions, and supporting older versions for a certain period.
Cohesion - partion for convenience of users
Define the Common-Reuse Principle
The classes in a package are
reused together” and ”If you reuse one of the classes in a package, you reuse them all.
In essence, when you depend on a package, you depend on every class within that package. So classes that are tightly bound should be in the same package.
Cohesion - portion so the classes are tightly bound together
Define the Common-Closure Principle
The classes in a package
should be closed together against the same kind of changes.” and ”A change that affects a closed package affects all the classes in that package and no
other packages.”
Basically single responsibility principle for packages.
Cohesion - partition so that a change is limited to one package
Define the Acyclic-Dependencies Principle
Importance of avoiding cycles in the package dependency graph.
When cycles exist, packages within the cycle effectively merge into one.
By eliminating cycles, it becomes easier to compile, test, and release software in a ’bottom-up’ manner.
Coupling
Define Stable-Dependencies Principle
The principle of stability emphasizes that a volatile package should not be relied upon by a package that is challenging to change.
Stability of a package is determined by how challenging it is to change,
taking into account factors such as its size, complexity, clarity, and the number of incoming dependencies.
Coupling
Define the Stable-Abstraction Principle
”a package should be
as abstract as it is stable.”
Stable package
should also be abstract, ensuring that stability does not hinder its extensibility and unstable should be concrete because instability allows easy changes to the concrete.
Coupling
Describe views in 1+4 View Model
Scenario view - as a user interacting with the system
Logical view - Functionality and its division in the system
Process view - Division into processes and their communication
Development view - How is system into implementation units
Physical view - Physical processing units and their connections and allocations
Describe ATAM
Identifies tradeoffs in architecture 4 phases
Introduction - To the participants the ATAM, business objectives and constraints and the architecture is described
Analysis - The utility tree for each quality property has been defined scenarios (with importance) and linked with arch. decisions to find tradeoffs and risks
Testing - Other stakeholders define scenarios and priorities from their perspective and the results from Anal are evaluated
Reporting - Presenting results
ATAM needs lots of time and resources, but advantage is testing from the view of multiple different stakeholders.
What is Product Lines, pros and cons
Artifacts, tools, and processes supporting one product family.
Enables more streamlined approach with better reuse.
Example is game series, starts with building a framework and then the games.
Pros
- Reuse of code and knowhow
- Faster product cycle and growth in long run
- Better standardisation
Cons
- The first product takes lot of time
- Hard to test initial stages
- Challenge to focus resources product vs. framework
- Education for new programmers
What is Frameworks and pros and cons
Framework is a a collection of classes implementing a common architecture and functionality to the product family.
The application specific code is often called by the framework - opposite to library.
White box - specialisation by inheritance and overloading
Black box - specialisation by parameters and configuration
Plugin - specialization by implementing interfaces.
Pros
- Can be based on experts - GUI frameworks
- Open for extension
- Supports layered architectures
Cons
- Not worth for single apps
- Demanding to create
- Can grow really complex
- Testing can be challenging
- Education for devs
- Limited flexibility
What is layered architecture, pros and cons
Layered architecture consists of levels organized according to some abstraction principle into ascending order.
It is partion by structure.
Communication can be only to levels neighboring or bypassing layers - pure is just top down request/response.
Typical is UI, App logic and Data base layers.
Pros
- Applicable to most usecases
- Easy to understand
- Less dependencies and good reusability
- Easy to test individual layers
Cons
- Information has to go through multiple layers
- Error handling is difficult
What is Pipes and filters architecture, pros and cons
Consists of filters that are processing units and pipes that carry data in between them.
It is partition by functionality.
Each filter is independent with input and output stream - there is no state being shared.
Parallelism is possible using FIFO buffers between filters.
Example is image processing program with series of steps applied to the image
Pros
- Possibility of incremental processing of complex process
- Possibility to combine and replace filters - reuse and maintenance
- Support concurrency
Cons
- Specific usecase, not for interactive systems
- Similar to layered sometimes unnecessary work
- Difficult testing
- Difficult error handling