[PEPr] Comment on Web Services::Services_Memotoo
| From: | Michael Gauthier | Date: | Sun, 17 Jan 2010 04:58:31 +0000 |
| Subject: | [PEPr] Comment on Web Services::Services_Memotoo | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53220@lists.php.net to get a copy of this message | ||
In general the code looks good. Here are some suggestions:
1.) @ error suppression is a bad idea. Use exception handling for the SOAP
object instead.
2.) Consider using protected members rather than private. Protected
members are accessible to subclasses and can make testing easier.
3.) self::ERROR_SOAP is undefined and will cause a notice when the
exception is thrown.
4.) It's a bit strange to have debug() in the public API.
5.) Summaries for methods should use 3rd person declarative rather than
2nd person imperative, beginning with a verb phrase. (Gets X, rather than
Get X).
6.) It might make sense to split the classes up into separate groups like
bookmarks, tasks, contacts, calendar, etc. The API would then read like:
$memotoo->getContactGroup('friends')->search('Joe');
--
http://pear.php.net/pepr/pepr-proposal-show.php?id=620