Re: Put all class in one file or different files
| From: | Peter Lind | Date: | Sun, 29 Aug 2010 08:53:14 +0000 |
| Subject: | Re: Put all class in one file or different files | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307738@lists.php.net to get a copy of this message | ||
On 29 August 2010 08:14, Haulyn Jason <saharabear@gmail.com> wrote:
> On 08/29/2010 02:04 PM, Eric Cash wrote:
>>
>> I'm out and about right
>> now, so I can't link you to the autoload documentation page
>
> Thanks Eric, I have read the autoload document, but not pay attention on it.
> I will search more about it now, thanks.
>
For maintainability: 1 class, 1 file
For performance: all critical/core class in same file (i.e. the ones
you WILL load no matter what), the rest loaded as needed
It's a tradeoff. If you don't know which to pick, go with 1 class, 1 file.
Regards
Peter
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>