Suggestions

Apr 10, 2008 at 3:57 PM
Any comments or suggestions are welcome, thanks!
Apr 10, 2008 at 5:25 PM
Edited Apr 10, 2008 at 5:26 PM
I would recommend you use an XML data file that stores conversion factors and formulas.
<data>
<units>
<unit name="inches" type="mynamespace.length" id ="in" />
</units>
<conversion>
<cf unit="cm" intermsof="in">0.39</cf>
<conversion>
<formulas>
...
</formula>
</data>

Then write a liabary that can consume that xml. So if you want to add a new formula or conversion its not a code change its an addition to your data file. Your liabary become less bloated this way.
Apr 10, 2008 at 7:16 PM
Edited Apr 10, 2008 at 7:16 PM
Thanks, I will look into that... your idea is a great way of managing the conversions. :-)