Detailed design Flashcards
(25 cards)
How do the slides draw the boundary between architecture and detailed design?
Architecture fixes non-local, intensional structures that span the system; detailed design refines those structures locally so each component can be built and tested. :contentReference[oaicite:26]{index=26}
State the Intensionality–Locality Thesis in one sentence.
Architectural specs are intensional and non-local; implementation is extensional and local; detailed design is intensional but local—bridging between the two. :contentReference[oaicite:27]{index=27}
List the three “3-1-2” object-oriented principles highlighted in the lecture.
(3) Encapsulate what varies (1) Program to an interface, not an implementation (2) Favour composition over inheritance. :contentReference[oaicite:28]{index=28}
What does “encapsulate what varies” mean in practice?
Place changeable behaviour behind a stable interface so modifications don’t ripple through the rest of the code. :contentReference[oaicite:29]{index=29}
Why is “program to an interface” a safeguard for modifiability?
Clients depend on abstractions, allowing alternative implementations or mocks without code surgery. :contentReference[oaicite:30]{index=30}
Give one reason to favour composition over inheritance.
Composition assembles behaviour at run-time, avoiding rigid class hierarchies and the fragile-base-class problem. :contentReference[oaicite:31]{index=31}
In design-model terminology, what is the difference between intensional and extensional views?
Intensional views describe families of structures with free variables; extensional views list concrete instances (actual classes, methods). :contentReference[oaicite:32]{index=32}
Define a “design model” according to the lecture.
A small logical structure whose atoms are classes, methods, and relations such as Extends or Invoke—abstract enough to reason about yet close to code. :contentReference[oaicite:33]{index=33}
Why are design patterns considered intensional and local?
They describe reusable collaboration templates (intensional) that apply within a component boundary (local), not across the whole architecture. :contentReference[oaicite:34]{index=34}
Describe the Decorator pattern in one line.
Wrap an object to add responsibilities dynamically without changing its code or class hierarchy. :contentReference[oaicite:35]{index=35}
What problem does the Adapter pattern solve?
It converts the interface of an existing class or library into one that a client expects, isolating vendor APIs. :contentReference[oaicite:36]{index=36}
How does Builder differ from Abstract Factory?
Builder separates construction steps from representation, letting the same process create different products; Abstract Factory simply chooses among product families. :contentReference[oaicite:37]{index=37}
Give one benefit of the Decorator pattern for modifiability.
New behaviour layers can be added or removed at run-time without editing existing source code. :contentReference[oaicite:38]{index=38}
Outline the process view of detailed design given in the slides.
Revisit ASRs → apply 3-1-2 to hotspots → document class/sequence diagrams → feed uncertainties into the architectural backlog or prototypes. :contentReference[oaicite:39]{index=39}
How does the architectural backlog interact with detailed design?
Design-time questions or spikes are logged so unresolved issues stay visible and are prioritised alongside feature work. :contentReference[oaicite:40]{index=40}
Why can detailed design decisions make or break performance?
Choosing inefficient data structures or over-deep inheritance can negate architectural performance tactics. :contentReference[oaicite:41]{index=41}
What is an extensional artefact example for a Java system?
A concrete UML class diagram listing every class, method, and field. :contentReference[oaicite:42]{index=42}
How does a design model map onto code specifications?
The model’s abstractions (classes, relations) are instantiated as language-specific constructs (e.g., Java interfaces, imports) before implementation. :contentReference[oaicite:43]{index=43}
According to Eden & Kazman, why is detailed design still intensional?
It captures families of local solutions (patterns, rules) that are applied repeatedly, not one-off concrete instances. :contentReference[oaicite:44]{index=44}
Provide an example of applying 3-1-2 in the Twitter scenario from the slides.
Encapsulate varying timeline algorithms, define a TimelineStrategy
interface, and inject concrete strategy objects rather than subclassing Twitter
. :contentReference[oaicite:45]{index=45}
How can design patterns enhance testability?
Interfaces and composition (Strategy, Adapter) allow dependency injection and mocking, enabling isolated unit tests. :contentReference[oaicite:46]{index=46}
Distinguish between an architectural tactic and a design pattern.
Tactic addresses a quality attribute at system level (e.g., caching for performance); design pattern organises object collaboration locally inside a component. :contentReference[oaicite:47]{index=47}
What is the first step when refactoring legacy code without tests, per Feathers?
Identify change points and test points, then break dependencies so that tests can be inserted. (Slides quote Feathers in legacy context.) :contentReference[oaicite:48]{index=48}
Why can inheritance harm modifiability in large code-bases?
Child classes inherit internal details; changing a base class risks ripple effects and fragile subclasses. :contentReference[oaicite:49]{index=49}