[PEPr] Comment on Web Services::SabreAMF
| From: | Philippe Jausions | Date: | Fri, 05 May 2006 15:33:05 +0000 |
| Subject: | [PEPr] Comment on Web Services::SabreAMF | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42455@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for Web
Services::SabreAMF.
Comment:
According to your example AMF3Client, the script has knowledge of which
version to use. I would then recommend a factory pattern instead of the
ugly-duckling approach of wrapper class. This way the version used could
be changed with a single switch of a variable, instead of having to change
code to edit wrapper class name.
Regarding the constant classes, it just seems to me that the "_const" in
the name of the class is a bit redundant and not very flexible. I would
simply go with Services_AMF::R_RESULT instead of
Services_AMF_Const::R_RESULT. Also are R_RESULT and R_STATUS standard
names in AMF? Otherwise, you'd need to be more explicit in what the R_
stands for. For example RESPONSE_RESULT if that's the case.
You should use php://input instead of HTTP_RAW_POST_DATA in InputStream,
and you may also accept a stream resource as well to allow different
sources of input.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=348
--
Sent by PEPr, the automatic proposal system at http://pear.php.net