Re: Interface naming standards?

From: Date: Thu, 01 Jun 2006 18:47:05 +0000
Subject: Re: Interface naming standards?
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42732@lists.php.net to get a copy of this message
I don't agree with this. The common format for PEAR thus far has been: Spreadsheet_Writer (contains static factory - is abstract) Spreadsheet_Writer_Common (contains *definitions* of common functions - is abstract) Spreadsheet_Writer_Excel (contains Excel implementation) With an interface you'd probably have Common implement Spreadsheet_Writer_Interface and define some of the functions in the Interface. There's definitely scenarios where you'd want a Common class and an Interface. Additionally, very few PEAR packages that implement the factory pattern extend their drivers from the base class, instead relying on a common class. --Joe On Jun 1, 2006, at 11:36 AM, Stefano F. Rausch wrote:
Hi, Is it really necessary to add the tagging word "Interface"? Take for example: Spreadsheet_Writer ---> this is the interface Spreadsheet_Writer_Excel ---> implements the interface ;) Spreadsheet_Writer_OpenOffice Same would apply to abstract classes being extended. Positive side-effect: lesser to type and no naming "pollution". Why make things difficult? A package should always have API docs in place and (hopefully) a sort of manual, where "everything" is explained. Your feelings? -- Stefano Daniel Convissor wrote:
Heya: On Thu, Jun 01, 2006 at 09:38:20AM -0700, Joe Stump wrote:
I'm currently working on a package that I plan on having an interface defined in.
Funny you should mention this. I was thinking about a new pacakge with interfaces too, along these lines: Spreadsheet_Writer_Interface Spreadsheet_Writer_Excel Spreadsheet_Writer_OpenOffice Spreadsheet_Writer_Interface_Workbook Spreadsheet_Writer_Excel_Workbook Spreadsheet_Writer_OpenOffice_Workbook Etc... --Dan
--PEAR Development Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.pear.dev (#42732) next »