25-Comp-B11 Advanced Software Design · December 2019
Question 5 of 28: Quality Concerns Driving Different Design Decisions
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer) · Last updated
Notes on this paper
Reference texts: Sommerville, Software Engineering (10th ed., Pearson) — software processes, requirements engineering, design principles, testing, dependability; Pressman, Software Engineering: A Practitioner's Approach (9th ed.) — supplementary process and quality coverage; Gamma, Helm, Johnson & Vlissides (GoF), Design Patterns: Elements of Reusable Object-Oriented Software — creational/structural/behavioural pattern catalogue and the "program to an interface, not an implementation" / "favor object composition over class inheritance" principles; Sebesta, Concepts of Programming Languages (12th ed.) — polymorphism, dynamic binding, visibility, and multiple inheritance semantics; Bertrand Meyer, Object-Oriented Software Construction — design by contract, preconditions/postconditions/class invariants; Barbara Liskov's 1987 substitutability paper for Question 12; Karl Wiegers, Software Requirements (3rd ed.); Myers, The Art of Software Testing, for Question 6.
PART I — General Principles
Question 5: Quality Concerns Driving Different Design Decisions (Part I)
Quality concern 1 — Performance. If minimizing response time is the dominant concern for a data-access layer, the design decision favours a tightly-coupled, direct approach: embed SQL queries close to the call site, cache frequently-read data in memory, and accept some duplication if it avoids an extra indirection layer at runtime.
Quality concern 2 — Maintainability. If ease of future change is the dominant concern for the same data-access layer, the design decision goes the other way: introduce a Repository or Data Access Object abstraction between business logic and the database, accept the small overhead of an extra method call, and keep SQL centralized behind one interface so the database technology can change, or the query can be unit-tested with a mock, without touching business logic.
The two decisions are not simply "good vs. bad" — they are the objectively correct call for their respective concern, and the same design problem yields opposite structures depending on which quality attribute is weighted most heavily. In practice a design typically trades several quality concerns off simultaneously and documents which one was prioritized and why (Question 3's "quantifiable" metrics are exactly what makes this trade-off an explicit, comparable decision rather than a guess).