Re: [PEPr] Comment on Networking::Net_I2C
| From: | Samuel ROZE - D-Sites | Date: | Sun, 09 Aug 2009 21:23:07 +0000 |
| Subject: | Re: [PEPr] Comment on Networking::Net_I2C | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52597@lists.php.net to get a copy of this message | ||
Hello,
Le dimanche 09 août 2009 à 18:41 +0100, Philippe Jausions a écrit :
> - Agreed with Christian, comments and error messages should be in English
> (unfortunately for some, this is the de-facto standard language)
>
> - Net_IP2Country would be a better self-explanatory name
>
> - I'd suggest to do 2 separate classes for back end SOAP vs. HTTP.
> Net_IP2Country_SOAP and Net_IP2Country_HTTP, with a
> Net_IP2Country::factory($backend) method. Your code will be much cleaner
> instead of having hooks for methods to use, and that would also allow for
> extensions (interfacing with a MaxMind's GeoIP local database for
> instance)
>
Can you tell me how you view the organisation of my code ? At the
creation of the Net_IP2Country instance, i'll call Net_IP2Country_SOAP
or HTTP class ?
> - fopen(URL) may not always be allowed on a system, use HTTP_Request2
> package instead
If it's great for compatibility, no problems. :)
Thanks !