Davey Shafik [2005-03-05 04:16 UTC] Is it possible (I don't know ReST at all) to make a generic XML_ReST (Services_ReST?) package?
I would think that doing this will give users a much better solution that can be built on top of for themselves or that Services_Yahoo can use.
If so, it should follow the ext/soap and new ext/xmlrpci APIs
I am willing to put the time in to learn ReST and help write such a solution.
- Davey
Ryan King [2005-03-05 04:45 UTC] Davey-
I don't belive its necessary. I'd say that Net_URL/HTTP_Request are close enough to it on the request side and on the response side, the various services have a great deal of variety in their formats.
Stephan Schmidt [2005-03-05 09:58 UTC] Davey: I'd say XML_Serializer in conjunction with HTTP_Request are what you'd call a REST package. BTW: ReST is ReStructured Text, something similar to Wiki markup. REST is the webservice.
REST does not force any rules on the XML that is returned, so applying XML_Unserializer is the most generic thing you can do. I do not think that such a packagewould make any sense.
Regarding this package:
As I mailed Martin in private before he released the source, a friend of mine also implemented a package to deal with the Yahoo API and I would like to see the features merged:
* Easy wrapper to make queries (usage of a factory and setting sereval properties can be annoying at times)
* $result->fetchNext() is a feature I'd like to see for this package as well. More information about Daniel's package (including source and installable package) can be found at http://blog.php-tools.net/archives/116-PHP5-Client-for-Yahoos-Webservice-API.html
Stephan
Tobias Schlitt [2005-03-05 11:53 UTC] Is there a specific reason why this package is PHP5 only?
Martin Jansen [2005-03-05 14:42 UTC] Stephan: I like the idea of fetchNext() and I'd like to collaborate with your friend on this once the proposal is finished.
I'm not so sure about the wrapper idea though. We'll see.
Martin Jansen [2005-03-05 14:45 UTC] Tobias: There is no critical reason for this, but I have no intentions to make this package compatible to PHP 4 just for the sake of it. SimpleXML, abstract classes and Exceptions are just too handy.
Ryan King [2005-03-12 18:52 UTC] Shouldn't your Exception class extend PEAR_Exception, rather than the builtin Exception class?
Martin Jansen [2005-03-15 08:09 UTC] Ryan, when I wrote the code I wasn't sure about the current state of PEAR_Exception and the guidelines around it. But I promise to make sure that everything is fine with regards to PEAR_Exception before releasing the package.
|