Re: Package proposal Science_Weather
| From: | Jesus M. Castagnetto | Date: | Wed, 27 Aug 2003 00:55:55 +0000 |
| Subject: | Re: Package proposal Science_Weather | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20596@lists.php.net to get a copy of this message | ||
The code you have there looks clean to me, and I like the decomposition you are
planning for the package.
I am a little concerned with the name of the package though. When we started
the 'Science' category in PEAR the idea was to put there packages that dealt w/
Physics, Chemistry, Biology, etc. In the case of your package, it would nice if
it were:
Science_Meterology_Weather
But that would give the idea that I could use the code there to process weather
related data (e.g. calculate flow rates/fields from wind measurments), not just
access the weather conditions from a region and display them.
Strictly it is accessing metereological data from a server, not doing any
processing or implementing metereological algorithms.
If we had a 'Services' category, then I would propose a better name would be:
Services_Weather
IMHO that will explain the aims of the code better.
At some point I proposed something like that for servers that generate 'true'
random numbers (using attached hardware random number generators), and thought
finally that Services_RandomNumber would've been a good name, but did not get
enough +1s back then.
Bottomline:
Conditional +1 for the code to access the weather services
-1 on the current name, as a better one could reflect the purpose in a more
clean and precise way (i.e. Services_Weather)
If the name is changed I am +1 unconditionally.
--- Alexander Wirtz <lists@zyanka.li> wrote
> On Fri, Aug 22, 2003 at 01:36:48PM +0200, Stephan Schmidt wrote:
> > Basically I like the class very much, but I'd like to see it renamed to
> > Science_Weather_WetterDotCom.
> > I don't think that it's useful to go and create a unified interface for all
> > services that are available, as they probably won't be interchangeable. I
> > guess different services will provide different information and so using a
> > distinct name for the class should be enough...
>
> I'm at work right now :) tuupola from pear@efnet convinced me to use a
> factoring framework and right now we have
>
> Weather.php
> |--|--Common.php
> |--Metar.php
> |--WeatherDotCom.php
>
> Code is working like
>
> $weatherDotCom = &Science_Weather::service("WeatherDotCom");
> $weatherDotCom->searchLocation("foobar");
> ...
>
> you get the idea...
>
> The interchangeability stops there, where a certain service is not providing
> a special datafield, so METAR won't have a forecast for example, but the API
> for getting the data is the same.
>
> > If the name is changed, I'm +1 for this package, Coding style is great,
> PEAR
> > dependency could be removed...
>
> done.
>
> The code is already working, I tested them with two example-scripts and I
> get the same result like before the rewrite, so maybe I can give you an
> overview in a few hours.
>
> Regards,
> Alexander
>
> --
> PEAR Development Mailing List (http://pear.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
=====
--
Jesus M. Castagnetto (jcastagnetto@yahoo.com)
Research: http://metallo.scripps.edu/
Personal: http://www.castagnetto.org/
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com