Timeline for Design pattern for common properties: static properties or a separate single instance class?
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 19, 2018 at 10:32 | comment | added | Bernhard Hiller | "Title" and "Description" in a "catalog section" are generally not concerns of the item itself => they belong to a different class. Also, the price may change without a change to the item proper => might also be a different class. | |
| Nov 18, 2018 at 20:19 | vote | accept | goodeye | ||
| Nov 18, 2018 at 18:18 | comment | added | goodeye | Good. I added better examples that really would never (rarely) vary. Title (easy enough to repeat if needed), but Description you wouldn't want to copy the class description into every instance. | |
| Nov 18, 2018 at 18:17 | history | edited | goodeye | CC BY-SA 4.0 | Better examples of common properties. |
| Nov 18, 2018 at 12:32 | answer | added | Christophe | timeline score: 2 | |
| Nov 18, 2018 at 10:22 | comment | added | Bart van Ingen Schenau | The statement that (non-constant) properties of different instances must have the same value triggers a warning signal in me. It is extremely unusual that if you change property A in instance X, that then the same property in other instances also must change. I would urge you to check that those properties really must always the same for all instances, or if they just accidentally happen to have the same value now. | |
| Nov 18, 2018 at 3:30 | review | First posts | |||
| Nov 19, 2018 at 7:15 | |||||
| Nov 18, 2018 at 3:25 | history | asked | goodeye | CC BY-SA 4.0 |