Re: Interface naming standards?
| From: | Daniel Convissor | Date: | Fri, 02 Jun 2006 15:52:58 +0000 |
| Subject: | Re: Interface naming standards? | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42748@lists.php.net to get a copy of this message | ||
On Thu, Jun 01, 2006 at 09:43:52PM -0700, Justin Patrin wrote:
> On 6/1/06, Daniel Convissor <danielc@analysisandsolutions.com> wrote:
> >Hi Christian:
> >
> >On Thu, Jun 01, 2006 at 11:54:34PM +0200, Christian Weiske wrote:
> >>
> >> > Spreadsheet_Writer_Interface_Workbook
> >> > Spreadsheet_Writer_Excel_Workbook
> >> > Spreadsheet_Writer_OpenOffice_Workbook
> >> This not. I would do
> >> Spreadsheet_Writer_Workbook
> >> Spreadsheet_Writer_Workbook_Excel
> >> Spreadsheet_Writer_Workbook_OpenOffice
> >> and
> >> Spreadsheet_Writer_Format
> >> Spreadsheet_Writer_Format_Excel
> >> Spreadsheet_Writer_Format_OpenOffice
> >
> >But then a package gets tossed all over the place. Seems hard to maintain
> >and comprehend at a glance.
> >
>
> Eh? This correctly categorizes the classes. The workbook is a higher
> level than the specific driver for it. There should be a base workbook
> class (or interface) that the specific driver workbooks
> inherit/implement to allow for easy switching between the 2. This is
> exactly the same as Structures_DataGrid's DataSource and Renderer
> driver structure.
Here are the contents of the Spreadsheet_Writer_Excel package:
Spreadsheet_Writer_Excel
Spreadsheet_Writer_Excel_Function
Spreadsheet_Writer_Excel_Format
Spreadsheet_Writer_Excel_etc...
That means everything Excel is in the Excel directory. If we did this the
way Christian proposed, we'd have it all over the place:
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.
--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