Re: Re: [PEPr] -1 for XML::XML_RPC2
| From: | Helgi Þormar | Date: | Wed, 11 May 2005 14:18:51 +0000 |
| Subject: | Re: Re: [PEPr] -1 for XML::XML_RPC2 | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-37565@lists.php.net to get a copy of this message | ||
On Wed, 2005-05-11 at 12:53 +0100, Sergio Carvalho wrote:
> Pre-built binaries for windows:
> http://curl.haxx.se/download.html#Win32
>
> I've installed it a dozen times, and it is a piece of cake.
First using CURL really defeats the purpose of trying to create
something that could be used by future PEAR versions (given they need
xml rpc stuff) since CURL isn't installed by default and I really doubt
anyone wants to make people have CURL installed to use PEAR, anyway that
can be resolved with writing a backend.
I think you should rename Php to PHP and use PEAR::extensionload('curl')
there someplace since just assuming that people have curl installed and
then throwing a PHP fatal error at them if the function doesn't exists
(curl_init for example).
Also don't use () when you do require_once :-) It's not a important
thing to fix but well that's what we recommend and everyone is using.
require_once(dirname(__FILE__) . "/Backend/${backend}/Client.php");
This is just bad, this is not how PEAR things work, you should be doing
XML/RPC2/Backend ... until other is decided in those matter then this
package also has to ad heir to those rules.
Also please try to use less @ and check for errors and give people back
a usable error message :-)
You might want to use the PEAR_Exception class ? I can't tho say that
it's a must in any way, specially since I've never had a look at that
one, seems that all the PHP5 people here want people to use it, if not
then please let me know people ;)
Remember to move to the new header standard if the package is accepted.
do not do things like:
if ($foo) throw error
do:
if ($foo) {
throw error
}
try to use ' instead of " where you can.
----
Seems that's just about covers it, I'm not going to go into the design
or architecture since I do not have much experience with XML_RPC stuff
nor do I want to get sucked into some OOP madness :P
Thus I won't vote on this based on my lack of knowledge, anyway those
are just general tips so you can improve things.
- Helgi