Re: [PEPr] Changes in proposal for Util::Util_Observable
| From: | Philippe Jausions | Date: | Fri, 17 Sep 2004 15:56:31 +0000 |
| Subject: | Re: [PEPr] Changes in proposal for Util::Util_Observable | ||
| References: | 1 2 3 4 5 6 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33410@lists.php.net to get a copy of this message | ||
Stig S. Bakken wrote:
On Fri, 2004-09-17 at 02:28, Justin Patrin wrote:Anyway, "Observable_Interface" cannot be the proper name since it would require a new top-level "Observable" category... I don't see this package fitting in an existing category. Please check the comments under the proposal before restarting a new thread of discussion. Basically here's a summary: - Utils/Observable/Interface.php - Pattern/Observable/Interface.php - Interface/Observable.php If a new "Interface" category is used, then that prevents an implementation to be placed there. And yes it would be usefull to have a package that implements just the interface. On the other hand, an interface could be implemented by various packages, therefore having an "Interface" category makes it easy to not confuse the package for the interface. Another dowside of a "Interface" category, is the risk to have to recreate the whole PEAR directory structure under it. Some propose to put all the interfaces into one package for convenience. Doesn't seem very flexible or extensible as new interfaces couldn't be added individually. Some consider a new "Pattern" (or "Coding", "Programming") category too "framework" specific, and therefore shouldn't be included in PEAR. Basically, should an interface be in the same directory as the main package implementing it or should it be in a collection of interfaces? Consistency for all interface is a must, so to help you think consider the two interfaces: Observable and Template... -PhilippeI doubt anyone will misunderstand "Observable_Interface" as "an interface you can observe". There is precedence for this format in how exception and error classes are named, diverting from that is what would cause confusion.Observable_Interface rings a lot better in my ears, the intention is to make it sound English after all.But it's not an Interface you can Observe, it's an Interface to make something Observable. Also, Interface is a general category and IMHO should be a prefix for that reason. Class names in PEAR are supposed to go from general to specific.