Re: GoogleAPI class

From: Date: Fri, 12 Apr 2002 19:31:12 +0000
Subject: Re: GoogleAPI class
References: 1 2 3 4 5 6 7 8  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-5416@lists.php.net to get a copy of this message
Dave Mertens wrote:
On Fri, Apr 12, 2002 at 11:54:42AM -0700, Shane Caraveo wrote:
SOAP_Google?
Google_SOAP would be better.
Why? What other Google-classes does you expect? :-)
If that's the case, then just Google would be best. Why add the SOAP qualifier?
Because it build upon SOAP? Ans also because we have names like XML_Tree, XML_RCP, NET_Ping, NET_POP3, etc
I'm not entirely certain SOAP classes like the google class should go into PEAR. But if they do, we should handle it very carefully. I could see a day when there are a few hundred...few thousand...files people add to PEAR for various services.
Exactly in the way also CPAN is used. And don't forget where PEAR stands for (PHP Extension and Application Repository). So how more packages there are in PEAR, the better.
I'm not arguing against putting things in, I'm arguing for some forthought about how best to handle this in PEAR. Part of the problem to me is that it is easy to generate a proxy for a service, a function exists in the SOAP library already to do that (though it still needs improvements). So in theory, almost in practice, there could be a simple script in the SOAP library to let you do this: 'php -f SOAP/genproxy.php someservice.wsdl > someservice.php' It could be simplified to be as easy as 'pear install module'. So if we can do that, why clutter PEAR cvs with modules anyone can create locally at any time? Further, you often do not need a proxy to make the soap call at all: $s = new SOAP_Client('http://api.google.com/search/beta2'); $result = $s->call('doGoogleSearch', array(
    'key' => $key,
    'q' => $q,
    'start' => 0,
    'maxResults' => 10,
    'filter' => false,
    'restrict' => '',
    'safeSearch' => false,
    'lr' => '',
    'ie' => '',
    'oe' => '',
), 'urn:GoogleSearch'); There's your google call. Essentialy, I am very unconvinced there is much to gain, and that there could be much to loose, by putting light wrappers around this into PEAR. Shane

« previous php.pear.dev (#5416) next »