Detailed design Flashcards

(25 cards)

1
Q

How do the slides draw the boundary between architecture and detailed design?

A

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}

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

State the Intensionality–Locality Thesis in one sentence.

A

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}

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

List the three “3-1-2” object-oriented principles highlighted in the lecture.

A

(3) Encapsulate what varies (1) Program to an interface, not an implementation (2) Favour composition over inheritance. :contentReference[oaicite:28]{index=28}

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

What does “encapsulate what varies” mean in practice?

A

Place changeable behaviour behind a stable interface so modifications don’t ripple through the rest of the code. :contentReference[oaicite:29]{index=29}

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

Why is “program to an interface” a safeguard for modifiability?

A

Clients depend on abstractions, allowing alternative implementations or mocks without code surgery. :contentReference[oaicite:30]{index=30}

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

Give one reason to favour composition over inheritance.

A

Composition assembles behaviour at run-time, avoiding rigid class hierarchies and the fragile-base-class problem. :contentReference[oaicite:31]{index=31}

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

In design-model terminology, what is the difference between intensional and extensional views?

A

Intensional views describe families of structures with free variables; extensional views list concrete instances (actual classes, methods). :contentReference[oaicite:32]{index=32}

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

Define a “design model” according to the lecture.

A

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}

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

Why are design patterns considered intensional and local?

A

They describe reusable collaboration templates (intensional) that apply within a component boundary (local), not across the whole architecture. :contentReference[oaicite:34]{index=34}

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

Describe the Decorator pattern in one line.

A

Wrap an object to add responsibilities dynamically without changing its code or class hierarchy. :contentReference[oaicite:35]{index=35}

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

What problem does the Adapter pattern solve?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does Builder differ from Abstract Factory?

A

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}

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

Give one benefit of the Decorator pattern for modifiability.

A

New behaviour layers can be added or removed at run-time without editing existing source code. :contentReference[oaicite:38]{index=38}

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

Outline the process view of detailed design given in the slides.

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does the architectural backlog interact with detailed design?

A

Design-time questions or spikes are logged so unresolved issues stay visible and are prioritised alongside feature work. :contentReference[oaicite:40]{index=40}

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

Why can detailed design decisions make or break performance?

A

Choosing inefficient data structures or over-deep inheritance can negate architectural performance tactics. :contentReference[oaicite:41]{index=41}

17
Q

What is an extensional artefact example for a Java system?

A

A concrete UML class diagram listing every class, method, and field. :contentReference[oaicite:42]{index=42}

18
Q

How does a design model map onto code specifications?

A

The model’s abstractions (classes, relations) are instantiated as language-specific constructs (e.g., Java interfaces, imports) before implementation. :contentReference[oaicite:43]{index=43}

19
Q

According to Eden & Kazman, why is detailed design still intensional?

A

It captures families of local solutions (patterns, rules) that are applied repeatedly, not one-off concrete instances. :contentReference[oaicite:44]{index=44}

20
Q

Provide an example of applying 3-1-2 in the Twitter scenario from the slides.

A

Encapsulate varying timeline algorithms, define a TimelineStrategy interface, and inject concrete strategy objects rather than subclassing Twitter. :contentReference[oaicite:45]{index=45}

21
Q

How can design patterns enhance testability?

A

Interfaces and composition (Strategy, Adapter) allow dependency injection and mocking, enabling isolated unit tests. :contentReference[oaicite:46]{index=46}

22
Q

Distinguish between an architectural tactic and a design pattern.

A

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}

23
Q

What is the first step when refactoring legacy code without tests, per Feathers?

A

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}

24
Q

Why can inheritance harm modifiability in large code-bases?

A

Child classes inherit internal details; changing a base class risks ripple effects and fragile subclasses. :contentReference[oaicite:49]{index=49}

25
State a concise exam definition of detailed design.
The phase that refines architectural structures locally, using principles and patterns so each component can be constructed, tested, and evolved. :contentReference[oaicite:50]{index=50}