This feels like the form of false-laziness that is characterized in the RDBMS world as an unwillingless to create index tables. An index table sits on a Many:Many association, and describes how pairs of objects interact.
In the case of the Employee Vs Display association, it doesn't take much to see that this is Many:Many. There are many kinds of employee, and many kinds of display. To normalise the model you need an index table. Apply the same concept to the OO world, and you get an "associative object" that, for example, knows how to display an Exempt_Employee record on a Monochrome_PDA_Display.
Of course, when both peer objects have a class hierarchy, then the associative object's class hierarchy can get interesting (pairing all the leaves can get tedious). Fortunately, Perl doesn't require us to specify every last detail of this in the type system.
--Dave.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.