Re: [PEPr] Proposal for HTTP::HTTP_Spider
| From: | Matthew Feinberg | Date: | Fri, 05 Mar 2004 18:15:47 +0000 |
| Subject: | Re: [PEPr] Proposal for HTTP::HTTP_Spider | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-26141@lists.php.net to get a copy of this message | ||
> >* Why is PEAR.php included, if no feature that is provided by this file
> > is used?
Good question. No good answer. I wrote the class without pear for something
I was working on, and now I'm trying to 'Pearize' it. I felt I should use
PEAR because 'all the other classes are doing it'. I'll stop extending pear.
Is it okay to just return false instead of a pear error? Is it preferred to
return a pear error even if you only need a boolean so that future
development is easier, e.g. you've added new logic to a function which
requires the the addition of more fine grained errors. (Sorry, I'm new to
PEAR development)
> >* What purpose does the empty constructor serve?
Again, none. I looked at some other classes to try to understand how some of
the PEAR coding standards are used in practice. The class I looked at,
PEAR_PackageFileManager, has an empty constructor. I'll remove mine.
> >* There is a bunch of cool HTTP packages in PEAR, which should be used
> > within HTTP_Spider. (E.g. HTTP_Request)
Agreed. I am especially interested in HTTP_Client, because of its Cookie
support, though it is listed as beta. I'll look at integrating HTTP_Request.
> >* I do not think that it is a good idea to directly print debugging
> > messages to stdout. Instead, Log should be used to faciliate a
> > fine grained logging mechanism.
I haven't looked into Log before. Great idea.
On Friday 05 March 2004 12:42 pm, Marcos Neves wrote:
> Excellent Idea. I did one sometime but it was specific. Your class is
> generic. But I agree with Martin, if you wish to put your class at PEAR,
> would be better it divide the work with other packages like HTTP.
>
> Marcos Neves
>
> At 18:39 5/3/2004 +0100, Martin Jansen wrote:
> >On Fri Mar 05, 2004 at 05:2512PM -0000, PEPr wrote:
> > > Matthew Feinberg (http://pear.php.net/user/ketbra) proposes the new
> >
> > package HTTP::HTTP_Spider.
> >
> > > You can find more detailed information here:
> > >
> > > http://pear.php.net/pepr/pepr-proposal-show.php?id=29
> >
> >There are a few technical issues with this package:
> >
> >* Why is PEAR.php included, if no feature that is provided by this file
> > is used?
> >
> >* What purpose does the empty constructor serve?
> >
> >* There is a bunch of cool HTTP packages in PEAR, which should be used
> > within HTTP_Spider. (E.g. HTTP_Request)
> >
> >* I do not think that it is a good idea to directly print debugging
> > messages to stdout. Instead, Log should be used to faciliate a
> > fine grained logging mechanism.
> >
> >--
> > - Martin Martin Jansen
> > http://martinjansen.com/
> >
> >--
> >PEAR Development Mailing List (http://pear.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php