Re: Package proposal
| From: | bertrand Gugger | Date: | Thu, 30 Jun 2005 16:00:13 +0000 |
| Subject: | Re: Package proposal | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38401@lists.php.net to get a copy of this message | ||
Bonjour,
christophe blin wrote:
Bertrand Mansion wrote:Am I bloody ? why not use the right formula when it exists ? That means have other way of compute than linear ... using eventually more factors/parameters. I would understand the storage in convert "table" only and only if no computation is admissible. A gOOd structure could easily enable the user to implement (in php using what it wants) some customs units. Lot of pear packages are made this way enabling any customoization of "production" methods1/ Why would this be bad design to store the informations in the database instead of storing them in a file ? Isn't it the goal of a db to store relationnal data ? Personnaly, I prefer to avoid the file storage because it introduces a lot of problem (permissions, end-of-lines, ...).Current work : - allow the use of a database to store the units instead of using a file (adding unit will be then more simple and available to end-user)Useless and bad design IMO, the way Fahrenheit is converted to Celcius is not going to change so there is no need for a database. A simple PHP array should be enough, even for user-defined conversions.
2/ I did not say the user can modify the units, I only said the user can _add_ units and this is slightly different... Example: the user want to add the unit "bananas" to allow him counting the bananas he is producing in his farm. He would do so by saying that bananas is equivalent to the unit '1' (which means quantity) then he can use bananas wherever he want to use a quantity.Then, instead of a known unit, he furnishes a function/method for the conversions he needs: example using some mean weight of bananas according to the date ... if the user like that
Regards, chris à+-- bertrand "toggg" Gugger