[PEPr] Comment on Networking::Net_GPS
| From: | Philippe Jausions | Date: | Sat, 19 Apr 2008 16:02:10 +0000 |
| Subject: | [PEPr] Comment on Networking::Net_GPS | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49818@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for
Networking::Net_GPS.
Comment:
This is a bit confusing, at least to me. Probably partly because I am not
well aware of the mobile offers in Japan.
That being said, could you detail a little bit more about how the package
would work? From what I gather:
1. The browser on the mobile device would connect to a web site using the
package.
2. The package would know what type of device this is, and apparently
could determine the carrier from the User Agent HTTP header (with the use
of the Net_UserAgent_Mobile package)
3. The package would somehow know where to go to get the mobile's GPS
location (that's where I'm lost)
Otherwise, several things:
- New PHP4-compatible packages are not accepted in PEAR anymore, so please
correct to use public/private/protected scope keyword (update file docBlock
for the PHP version)
- getGPSResponse() assumes that "lat" and "lon" are passed in the URL
($_GET). Why is that?
- You probably meant "dispatch" in the name of your methods instead of
"dispath"
- What is "setEasy" used for?
- I wouldn't return the tag part in getGPSLink(), but simply the URL only.
It keeps the API much simpler and not try to mess with HTML formatting.
What is the link used for anyway?
- How one knows the the $url parameter to provide in getGPSLink() ?
- No parens should be around the switch's case. (Run PHP_CodeSniffer on
your code) (getGPSResponse())
- If the same logic is used for both self::SOFTBANK_3GC, and
self::SOFTBANK_3GC_EASY you don't need to duplicate the whole "case", just
don't put the "break" for the first one. (getGPSResponse())
- self::DOCOMO_MOVA doesn't return an array with lat/lon indexes in
getGPSResponse() as is returned with the other cases.
- The name of the package "Net_GPS" doesn't seem right, but I can think of
an alternative.
- The architecture of the package is not very extensible to easy add new
providers.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=552
--
Sent by PEPr, the automatic proposal system at http://pear.php.net