Re: [Fwd: Re: PEAR framework changes for PHP5]
| From: | Jon Parise | Date: | Thu, 29 Jan 2004 05:44:44 +0000 |
| Subject: | Re: [Fwd: Re: PEAR framework changes for PHP5] | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25322@lists.php.net to get a copy of this message | ||
On Wed, Jan 28, 2004 at 11:59:03PM +0100, Tobias Schlitt wrote:
> - But there should be a common base class, i guess, to be able to
> implement some additional features (e.g. a common versioning method, a
> common singleton method,...)
No, we don't want a common base class. If anything, we want some
common, generalized, lightweight interfaces that PEAR classes can
implement to extend their functionality.
> - Codingstandards have to be changed (correct old ones, add new ones
> for new features)
Please clarify.
> - As we have the chance, a common error standard has to be defined
> (regulation of error codes, for example, i guess error code definitions
> should become a standard in PEAR).
Maybe. Exceptions are preferrable to error codes in most situations
so we can probably avoid the issue of error codes entirely.
> - As there are interfaces available now, I guess we should add some
> templates for common patterns (factory, singleton,...) to the standards.
How would you implement a factory or singleton pattern using an
interface? The result would be so highly parameterized that you might
as well just write your own full implementation in your base class.
--
Jon Parise (jon@php.net) :: The PHP Project (http://www.php.net/)