[PEPr] Comment on Web Services::ContactsWindows
| From: | David Jean Louis | Date: | Wed, 09 Jul 2008 10:18:12 +0000 |
| Subject: | [PEPr] Comment on Web Services::ContactsWindows | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50371@lists.php.net to get a copy of this message | ||
David Jean Louis (http://pear.php.net/user/izi) has commented on the proposal for Web
Services::ContactsWindows.
Comment:
Hello Jonathan,
some comments:
* package should be named Services_WindowsLive_Contacts IMHO;
* you should run php codesniffer on your code;
* I would make the class properties protected instead of all private;
* looking at the Live Contacts api doc
(http://msdn.microsoft.com/en-us/library/bb463989.aspx), I would expect to
use your package like this:
$contacts->invite(...);
$contacts->update(...);
$contacts->view(...);
instead of:
$contacts->sendRequest(...)
This could easily be achieved using the __call() magic method
* I would put the exception class in a separated file (but I think this is
not required);
* In sendRequest(), you should add the return code in the exceptions
thrown, eg:
throw new Services_ContactsWindows_Exception(
'The remote server refused the DT.', 401
);
and the exception messages could be better IMHO (maybe include the message
returned by the server ?).
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=564
--
Sent by PEPr, the automatic proposal system at http://pear.php.net