Re: [PEPr] +1 for Web Services::Services_oEmbed

From: Date: Tue, 28 Oct 2008 18:40:08 +0000
Subject: Re: [PEPr] +1 for Web Services::Services_oEmbed
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50949@lists.php.net to get a copy of this message
Hi, David Jean Louis wrote:
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, 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.
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 array!
the 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. :]

« previous php.pear.dev (#50949) next »