Note that there are some explanatory texts on larger screens.

plurals
  1. PODesign pattern for class with upwards of 100 properties
    primarykey
    data
    text
    <p>What advice/suggestions/guidance would you provide for designing a class that has upwards of 100 properties?</p> <p><strong>Background</strong></p> <ul> <li>The class describes an invoice. An invoice can have upwards of 100 attributes describing it, i.e. date, amount, code, etc...</li> <li>The system we are submitting the invoice to uses each of the 100 attributes and is submitted as a single entity (as opposed to various parts being submitted at different times).</li> <li>The attributes describing the invoice are required as part of the business process. The business process can not be changed.</li> </ul> <p><strong>Suggestions?</strong></p> <ul> <li>What have others done when faced with designing a class that has 100 attributes? i.e., create the class with each of the 100 properties? </li> <li>Somehow break it up (if so, how)? </li> <li>Or is this a fairly normal occurrence in your experience?</li> </ul> <p><strong>EDIT</strong> After reading through some great responses and thinking about this further, I don't think there really is any single answer for this question. However, since we ended up modeling our design along the lines of <a href="https://stackoverflow.com/questions/1633196/design-pattern-for-class-with-upwards-of-100-properties/1633256#1633256">LBrushkin's Answer</a> I have given him credit. Albeit not the most popular answer, LBrushkin's answer helped push us into defining several interfaces which we aggregate and reuse throughout the application as well as a nudged us into investigating some patterns that may be helpful down the road.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload