As far as I'm concerned, data and code are a means to an end, but not something to focus on. I try to "blur my eyes" and find the *things*, and build my classes around those.
Trite, overused example: In a toy banking application, you could worry about balances and reports. Instead, I look for the *things* (account, customer) and then stick the code and data into the appropriate places. The stuff that doesn't easily go into a particular place is a flag: Either you didn't find all the things, or there are some rough edges that should be rethought to make things fit well, or it's just one of those things that doesn't fall into place. (I've never seen a large application where some stuff simply doesn't go into a nice place. Usually, it gets shoehorned into an 'Application' or 'Frobutility' class...)
--roboticus
(Who hasn't done any OO Perl, but has buckets & buckets of OO code for some other languages...)
In reply to Re: Philosophies of Objects
by roboticus
in thread Philosophies of Objects
by GuidoFubini
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |