Re: [PEPr] +1 for Web Services::Services_oEmbed
| From: | David Jean Louis | Date: | Tue, 28 Oct 2008 18:55:30 +0000 |
| Subject: | Re: [PEPr] +1 for Web Services::Services_oEmbed | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-50950@lists.php.net to get a copy of this message | ||
Alexey Borzov a écrit :
Hi, David Jean Louis wrote:The idea (taken from pear2::http_request btw) was to have a case insensitive container for headers, to avoid strtolower everywhere in the code.Ouch. I agree with Joshua here, 4 packages are definitely a no-no, especially because they are so interdependent. Also I think that a better idea is to implement actual request functionality first and spice it up with all the relevant SPL interfaces and magic __get() / __set() methods afterwards, not vice versa. A good example here is your HTTP_Headers class that wraps around an associative array of headers and then implements Iterator, ArrayAccess, Countable to make it look, well, like a genuine associative arrayOk, as promised here's the work I've done so far on HTTP_Request2: http://code.google.com/p/izi-sandbox/source/browse/#svn/trunk I took parts/ideas from pear2::HTTP_Request2, Zend fw and pear1::HTTP_Request, the result is 4 individual packages: - HTTP_Common (include a HTTP Message abstract class and Headers container class); - HTTP_Connection: this is where the "adapters" live (I still think that adapters are not a good idea though...); - HTTP_Request2; - HTTP_Response2.Ok. I'll try to finalize the parts I've started so far, and I will post them somewhere so you can check it out and move on setting things up.Thanks, HTTP_Request2 is long overdue, hope this time we'll be able to come up with something. :]
Ok. I'm off with HTTP_Request2, I already spent too much precious time on it yet, good luck guys... If someone want to take the code, It will stay on my sandbox. I'll just use curl for my projects at work, until something is done or pecl http is integrated into core. Moving to my other things now. -- Davidthe current implementation should support without problems: - chunked/gzip/deflate response, - keep-alive connections, - redirects, - subject/observer pattern, - etc...I tend to agree with Joshua once again that your implementation would make it difficult to leverage available PHP extensions (read: cURL).Note that some parts of the code are copy/paste/adapted from others implementations, so I need to add @author/@copyright tags where relevant (this will be done of course, just didn't had time...).Is verbatim copying from Zend Framework really a good idea? Finally I'd like to suggest we finish hijacking the "Services_oEmbed" thread and start a new one. :]