Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
When we look at the same thing from DIFFERENT "perscpective", we are looking at exactly the SAME thing, there is NO doubt about this, but we focus on DIFFERENT attributes, as we need.

To be frank, my first feeling is that, Perl or @ISA is not quite relevant to what we want to talk about here, actually this is more a question about OO ITSELF.

Let's look at your example. An employee could be a father, a mother, a musician (although might be a lousy one ;-).

  1. What do you want to abstract from the real world?

    Each application always has its PARTICULAR PURPOSE. For example, if this is a HR (Human resource) application, we want to abstract employee as a class, but most likely not musician or father. If this is a system for a special group of musicians in my city, then I would abstract musician as a class.

    Then where would the other information go? You can argure that you obviously care whether a employee is a musician, so you may use him for your company's Xmas party.

    Very good, but those should really be treated as attributes rather than a separate class. Again, this is about what the PURPOSE is, and what the FOCUS is.

  2. Is this a subclass or an attribute?

    This question may sound stupid (or way too obvious) to some people, but actually not. Say there is one employee, and he has two attributes:
    1. He is a father;
    2. He is a manager;
    You can treat both as attributes, but you may also think that, the attribute whether a person is a manager is important enough, that a new class should be abstracted as a subclass of employee.

    Again this is about PURPOSE. When it is extreamly reasonable to abstract manager as a subclass in a HR system, it is definitely uneccessary to abstract a manager class in a "house hold management system", just because the father of that family happens to be a manager in his work place, because it is irrelevant to the PURPOSE of your "house hold management system".

  3. Last but not least, the POWER of human thinking is that, we gather all relevant information, and then FILTER and SIMPLIFY what we see, and UNDERSTAND it from a particular PERSPECTIVE, base on our purpose and focus. We try to UNDERSTAND the world around us, within the capbility and capicity of our brain, but not try to be CONFUSED by it.



Ctrl-Z, you are not sinned. No body is sinned because he thinks, anyone thinks is blessed.

In reply to Re: perspective and object-disorientation by pg
in thread perspective and object-disorientation by Ctrl-z

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-23 20:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found