Re: allfiles.php has nothing to do with performance -please read the proposal CAREFULLY
| From: | Philippe Jausions | Date: | Tue, 28 Aug 2007 16:37:21 +0000 |
| Subject: | Re: allfiles.php has nothing to do with performance -please read the proposal CAREFULLY | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-47886@lists.php.net to get a copy of this message | ||
Matthew Weier O'Phinney wrote:
> On 8/28/07, Philippe Jausions <Philippe.Jausions@11abacus.com> wrote:
>> Alexey Borzov wrote:
>>> Gregory Beaver wrote:
>>> A better solution would be to provide a "one file - one package"
>>> distribution or a phar file.
>> Doesn't sound like a good idea to me. It wouldn't allow developers to
>> override one class of the package for bug fixes for instance.
>
> On the other hand, it *would* encourage proper OOP programming:
> extension instead of overriding. You typically shouldn't be dropping in
> replacement classes, but instead extending the existing class and
> overriding methods as necessary.
This is not necessarily possible with most of the PEAR packages, which
is not to say it shouldn't be possible. For that purpose, usage of
Interfaces should be encouraged in PEAR, and some PEAR packages would
greatly benefit from it in flexibility. For example, instead of creating
a HTTP_Request instance from inside a class, the said class should also
be able to accept a user provided HTTP_Request-compatible instance.
As it is, a single-file per package would not allow self-patched
classes. And of course, a single file package wouldn't help with
__autoload()
-Philippe