Re: [PEPr] Comment on HTML::HTML_Libravatar
| From: | Melissa Draper | Date: | Thu, 19 May 2011 11:08:52 +0000 |
| Subject: | Re: [PEPr] Comment on HTML::HTML_Libravatar | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-54290@lists.php.net to get a copy of this message | ||
Hi Christian,
Thanks for the quick feedback.
On Thu, May 19, 2011 at 8:11 PM, Christian Weiske <cweiske@php.net> wrote:
>
> I think libravatar is great and welcome a pear package for it.
>
> Your code nevetheless needs some ground work:
> - Since you are interfacing a web service, use Services_Libravatar as
> package name
>
I seem to have misread the groupings. Thanks!
> - Give the class the proper class names (Services_Libravatar), put them in
> the correct place
>
I'm unsure what you're meaning by "put them in the correct place" here.
> - You don't need "@access" docblock tags anymore since we're on php5
>
I wasn't aware, thanks! I must have been looking at the wrong examples.
> - You could cache DNS results, which make using an libravatar object for
> several email addresses faster
>
It is my understanding that dns_get_record does cache. At least that's the
impression I got when researching caching.
> - Please have a look at Net_DNS and if you can use it. Maybe it already
> includes sorting by priority, so you don't have to use your own
> implementation.
>
I did have a look at and consider this package while implementing the
functionality as I have. I found that it was a rather heavy way to implement
the functionality I'm using dns_get_record for. The docs (
http://pear.php.net/manual/en/package.networking.net-dns.net-dns-resolver.query.php)
indicated that it doesn't order the results and also returns the entire
record as a string hence requiring additional manipulation, whereas
dns_get_record returns an array outright. If I am misunderstanding the docs,
I'm happy to be corrected on that point.
I have also discussed this suggestion with the Libravatar lead developer and
while he agrees the methods could use improvement as the weighting
procedures are not matching the RFC, I don't believe Net_DNS is the answer
in this case.
Once again, thanks for the feedback. I'm currently working on renaming the
library. Related to that, what is the process from here? Should this
proposal be abandoned in favour of a fresh one under the correct name?
-M