Scenario

日本語 こちらをクリック

We present two distinct design choices that address the same design problem: enable the "display, selection, and invoice of products” for a web store. The web store should display the available products and allow the user to select the quality of each item they want to purchase. After items are selected, an invouce should be generated detailing which items were purchase, how many, extended cost, tax, shipping, and total cost.


 For the purposes of our discussion, the following simplified facts will hold true.

 

 

In terms of design specifications, design quality, or evolutionary requirements:


Design A
Design B

A B
Separated Concerns splits the of display and selection of products from invoice generation, and also from management of the products. Product selection data is passed from Store display to Invoice. Product data is a shared collection entity for both classes (possibly a file or database). The integrated design uses a single class to manage display, selection, and invoice creation using conditinal logic to switch between product display and invoice modes. Product information is embedded in the class as an attribute (possibly a static array).

 

Compare the two designs below by selecting which design is the "best" answer to the question asked.

Question
A
B
=/?
Relevance
Which design is more easily implemented?
Which design is more easily extended?
Which design is more easily maintained?
Which design is better able to handle errors, bad-inputs, unexpected events/actions, and off-nominal conditions?
Which design is easier to test and debug?
Which design has higher runtime performance or is more efficient?
Which design is more easily understood?
Which design is less complex?
Which design better addresses the problem (as understood from the description link)?
 
Profile Questions
Your confidence implementing software designs (as a developer)?
Your confidence with creating software designs?
How confident are your ability to evaluate the qualities of a design?
What is your email address?