Re: OOP slow -- am I an idiot?
| From: | Richard Lynch | Date: | Wed, 11 Oct 2006 19:55:46 +0000 |
| Subject: | Re: OOP slow -- am I an idiot? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-243000@lists.php.net to get a copy of this message | ||
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote:
> I want to create a "customer" class which fetches its attributes from
> a MySQL database.
No, you don't. :-)
This is a classic example of the "obvious" OOP solution being wildly
inappropriate.
The sad thing is, there are a zillion applications out there doing it
just this way... :-(
Start thinking more in terms of what you want the whole application to
do, and build classes that do THAT, rather then starting with a single
customer and their info.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?