Re: Take over of package Services_Webservice
| From: | Matthew Fonda | Date: | Thu, 17 Dec 2009 02:41:57 +0000 |
| Subject: | Re: Take over of package Services_Webservice | ||
| References: | 1 2 3 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-5552@lists.php.net to get a copy of this message | ||
On Wed, Dec 16, 2009 at 6:17 PM, Michael Camden
<camden.michael@gmail.com> wrote:
> Hello Matthew,
>
> There are two changes to the code that I wanted to address in turn.
> First however, let me say thank you for producing the code in the
> first place. When I set out to create my first PHP SOAP server, I was
> mortified to find out that I may have to write my own WSDL file. I
> was, needless to say, extremely happy to find your code.
I am actually not the author of the code, just a user at one point :-)
> 1. while/list/each vs foreach. Foreach's default operation is to
> copy in to memory the array that is passed to it, and work with that
> copied array within the loop. The speed difference between
> while/list/each and foreach with smaller arrays is negligible, however
> as the array gets larger the difference in speed becomes more clear.
> It is absolutely easier to understand a foreach rather then a
> while/list/each loop. The website you posted,
> http://www.php.lt/benchmark/phpbench.php, only seems to confirm
> that
> while/list/each is faster then foreach. In the first section, the
> tests use the same set of data. Tests 2, 4, and 6 complete within 3,
> 15, and 9ms respectively. The foreach mirror of those tests 1, 3, 5
> complete in 6, 21, and 10ms respectively.
Results seem to vary each time it is loaded--it seems sometimes one is
fast than the other, but not consistently.
> 2. The other modification to the class I made, was to address bug
> #15221. I set the value, formatOutput to true for the DOMDocument
> objects. It adds the proper spacing, tabbing and new lines to the
> outputted document.
I imagine fixing coding standard issues would definitely be welcomed.
Writing some tests would be great too! I am not a maintainer of the
package but I am sure they would appreciate it.
> I think that you idea of creating a service to automate the creation
> of RESTful services would be very interesting. Were you thinking for
> example,
>
> http://www.example.com/parts
>
> When viewed as such would return the standard view displaying a list
> of parts for the user.
>
> http://www.example.com/parts/?xml
>
> Would produce the list of parts, but in an XML feed
>
> http://www.example.com/parts/?json
>
> Would produce the list of parts, but in javascript object notation.
>
> If you were, I think it would remove a lot of clutter involved in back
> end functions to support that. You mentioned that you may need help
> with that, and as I have very few ideas of my own to work on
> currently, I would love to assist.
Yes, something along these lines. I think it should require careful
design and input from the PEAR community.
Best Regards,
--Matthew