[PEPr] Comment on Database::table_browser
| From: | Philippe Jausions | Date: | Fri, 29 Aug 2008 15:43:12 +0000 |
| Subject: | [PEPr] Comment on Database::table_browser | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50680@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for
Database::table_browser.
Comment:
Several flaws / questions:
1) Missing support for multi-column primary key and sorting
2) I'm not understanding the reason being the 2 steps: create instance
then select table. What is the benefit? I feel that being able to reuse the
same browser instance for 2 different tables will lead to confusion in user
code. A static method (factory, singleton,...) would be more appropriate.
3) As Till already pointed at, MDB2 and / or PDO would be much better,
especially the former when it comes to compatibility / portability.
4) No Iterator / IteratorAggregate implementation
5) You may want to update the examples. There are discrepancies between
comments and method calls.
6) Instead of referring to "category", using "column" sounds more generic,
and more related to an actual "table"
7) I would also reserve the term "item" when accessing by value, and "row"
when browsing.
8) No ArrayAccess implementation
9) Way far from PEAR's coding standards, but this is very minor at this
stage of proposal given the items above.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=570
--
Sent by PEPr, the automatic proposal system at http://pear.php.net