Re: Re: DB_DataObject and MDB
| From: | Alan Knowles | Date: | Wed, 05 May 2004 13:09:06 +0000 |
| Subject: | Re: Re: DB_DataObject and MDB | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-28828@lists.php.net to get a copy of this message | ||
[ lots of stuff deleted....]
I guess I take the opposite perspective on classes; I want more classes with fewer methods rather than few huge classes. IMO this makes for code that easier to customize, debug, refactor and test. But true, probably performance suffers -- especially when using class-per-file model. In DB_DataObject does each row in the db have to be an instance of a class that extends DB_DataObject?Yeap - this has alot of knock on effects, which mean that storing database connection and results in the object vars become impossible (as it would bloat the memory consumption when you clone, and make print_r() considerably messier). It's a trade off, but the end result is an end user API that has a beauty in it's simplicity.. (even if the back end has to jump through hoops to provide it..:) Regards Alan