Comments for "Services_Amazon_SQS"

» Submit Your Comment
Comments are only accepted during the "Proposal" phase. This proposal is currently in the "Finished" phase.
» Comments
  • Till Klampaeckel  [2008-11-17 11:55 UTC]

    Some feedback:

    1) I'd un-tie the hardcoded dependencies in your class. For example, SoapClient(). Without making it too complicated, I'd add a public setter setSoapClient() and let people inject their own client. And if none is provided, only then create your own client.

    2) private vs. protected - use protected to allow people to overload/extend your class code.

    3) Use public on methods when appropriate.

    4) Your Exception class needs to extend PEAR_Exception.

    5) I saw you're converting to "cents" somewhere, what if the product you sell is in "cents" already? Maybe add some sort of check or configuration option to avoid the conversion.

    6) Some of these vendors have a debug/test mode, if there is one, it might be a good idea to implement it. I have no idea though - this is just a thought. :-)

    7) You'll need a package.xml which lists all dependencies - such as PEAR, soap, etc..

    Aside from all those, looks pretty clean and very straight forward to use!