Re: Interface naming standards?
| From: | Daniel Convissor | Date: | Wed, 07 Jun 2006 12:28:53 +0000 |
| Subject: | Re: Interface naming standards? | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42811@lists.php.net to get a copy of this message | ||
On Tue, Jun 06, 2006 at 11:14:07PM -0700, Ian Eure wrote:
> On Jun 2, 2006, at 8:52 AM, Daniel Convissor wrote:
> >
> >Spreadsheet_Writer_Excel
> >Spreadsheet_Writer_Function_Excel
> >Spreadsheet_Writer_Format_Excel
> >Spreadsheet_Writer_etc..._Excel
> >
> >Thus, the Excel packge files would be in the Function dir, the
> >Format dir,
> >etc... Total PITA to find things.
> >
> Just depends on how you're thinking of it, I suppose. I don't think
> that the latter is all that terrible, and splitting off the Excel
> stuff into a subpackage would help as well.
They can not be sub-packages. They are an integral components needed to
write spreadsheets:
Spreadsheet_Writer_Excel
the central class for the driver.
the classes below become properties in this class.
Spreadsheet_Writer_Excel_Format
processes formatting of cells in the spreadsheet
Spreadsheet_Writer_Excel_Function
processes writing functions into the spreadsheet
That package will then have a dependency on "Spreadsheet_Writer" which
contains static methods needed by all of the spreadsheet drivers, such as
factory().
This last aspect causes problems with the naming scheme you proposed in
another email in this thread. You proposed Spreadsheet_Writer be the
interface. But it can't be. Many packages in PEAR follow the base class
/ driver layout I'm talking about here (eg: DB, MDB2, etc...)
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409