Re: post an array into another site
From: Manuel Lemos (mlemos_at_acm.org)
To: email@example.com Date: Tue, 09 Dec 2003 01:08:24 -0200
On 12/08/2003 11:36 PM, Justin Patrin wrote:
>>>>>> You may want to try this class that lets you make HTTP requests
>>>>>> like a normal browser:
>>>>> Or even better, use PEAR's HTTP_Client. http://pear.php.net/package/
>>>> > HTTP_Client
>>>> Why better? Have you tried both packages?
>>> No, however, the httpclient system is a lot of code that is part of one
>> No? If you have not tried it at all WTF are you claiming that
>> something else is better? Better than what? Something you have not tried?
> Even if I have not used the other thing, I am still very likely to work
Therefore, your claim that it is better is void because you have no
basis for comparison.
> with PEAR packages. Why? Because I know that I can get help with it from
> the PEAR developers and get fixes and updates easily and quickly.
Who told you that you do not get help from developers that contribute to
the PHP Classes site?
The way I see it depends. Some developers provide better support then
others . It depends on if and when they are available when you ask. That
applies to any developers regardless of the where they contribute their
In this case, I developed the HTTP client class and I can tell you that
I try to provide prompt support whenever I am not so busy (which is not
all the time, but frequently).
I even tell you more, recently I even had to develop a patch to fix a
bug in PHP itself that affected all code that deals with socket connections.
Personally, I am not looking for medals of recognition or whatever, but
one thing that you can't say is that only developers that contribute to
PEAR always provide prompt support.
Not only that is not always true, but you are probably insulting all
other PHP authors that contribute to PHP Classes or other repositories
that are very commited to providing great support despite they all work
for free and benefit of many thousands of PHP users.
>>> class. HTTP_Client is based on lots of sub-systems, each of which can
>>> be used seperately and for other purposes (and each of which is
>>> maintained by seperate, multiple people). For instance, there is the
>>> Socket API,
>> Are you telling me that to make HTTP requests, loading half of dozen
>> classes is better than doing it all with just one?
> Yes, it is better to have them all in seperate packages for
> maintainability. If you have everything in one place, you're VERY prone
> to errors.
I completely disagree. Spliting all in classes that provide more
functionality that you may need to make HTTP requests certainly is more
likely to have more bugs because you end up with more code.
>>> Also, and just as important, using PEAR packages gives you a
>>> centralized way of dealing with errors.
>> You meant that 800 line fat base class that many PEAR classes inherit
>> and require in order to run even when developers do not want anything
>> from it?
>> No thanks, I am not interested in bloated software development.
> PEAR is used in many production systems and the classes are tuned for
> speed. Or if they aren't you can alter them and send in a patch. PEAR
I am sorry, but you can't convince me that using a bloated 800 line base
class, that most of the time you do not need, it is tuned for speed.
If you knew the PHP object model minimally, you would know that inherit
classes for needless reasons only adds overhead to object creation,
meaning it takes more time and memory to create objects of subclasses.
> promotes standards instead of ad-hoc programming. It's better to write
> your error handling code once instead of re-creating it for every
> package you ever write.
I am sorry but I disagree that PEAR error handling is any good because
it replicates the error handling functions that PHP already provides.
Furthermore, I prefer that functions that are susceptible to fail return
a boolean condition that is simple to verify and an additional error
variable that explains the error to humans. I do not need to inherit
bloated 800 line base class to do that.
> Not all PEAR packages inherit from PEAR. Some just use pieces of it.
> Some don't use it at all. It all depends on what the package needs.
You are just validating my point. Those classes that do not use the PEAR
base class are meant for speed and simplification.
Anyway, your initial point is that PEAR is good because it provides
central error handling, when you have just confirmed that some classes
do not use it because at least some of use know that it is a bad idea.
-- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/