[PEPr] Comment on System::Shared
| From: | Justin Patrin | Date: | Fri, 02 Sep 2005 17:07:59 +0000 |
| Subject: | [PEPr] Comment on System::Shared | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-39695@lists.php.net to get a copy of this message | ||
Justin Patrin (http://pear.php.net/user/justinpatrin) has commented on the proposal for
System::Shared.
Comment:
I don't think System_Shared is th ebest name for this package.
System_SharedMemory perhaps?
In Shared.phps please don't use sprintf. It's much slower than normal
concatenation and isn't needed here.
Plugin classes should be in the System/SharedMemory/ directory, not
Plugins/.
Plugin filenames should be capitalized.
Plugin classes should be named after their file path.
System/SharedMemory/File.php should have the class System_Shared_File.
Using the same class name is not acceptable.
All plugin classes should inherit from a base class which takes care of
the common functions (such as engineName()) and defines the functions to
be overridden in the plugins. System_SharedMemory_Common or
System_SharedMemory_Plugin would be fine.
@ should not be used in general (it causes errors to happen which the user
has no awareness of). Any errors which happen should raise a PEAR_Error
instead of being ignored. For example, in the File plugin should the
fopen() calls really be silenced and the possibility of an error when
opening ignored? Perhaps if the file doesn't exist upon instantiation it
should be created.
All ifs (and while, for, do, etc) must have braces.
TRUE, FALSE, and NULL, should be written as true, false, and null.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=294
--
Sent by PEPr, the automatic proposal system at http://pear.php.net