in reply to Re^3: Really Writing Object Oriented Perl
in thread Really Writing Object Oriented Perl
The notion that Objects are a "metaphor" doesn't really work: if you start off with a rule of thumb like "identify the nouns", you're likely to end up with something that's over-designed and that under-performs. My opinion (at the moment at least) is that it's best to just think about classes as bundles of routines that need access to the same data.My rule-of-thumb is to start out with your rule (routines that access the same data should be in the same object or class) and apply the relational database normal form rules to figure out which data needs to go where. After that, you may want to put "convenience methods" anywhere it's convenient and/or break the rules when it's needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Really Writing Object Oriented Perl
by herveus (Prior) on Jun 04, 2007 at 11:27 UTC |