Convert It 2.6 has now been posted at http://blogs.msdn.com/dglover/articles/category/11231.aspx.
"Convert It V2.2" for your Windows Mobile Smartphone
It runs on a Windows Mobile Smartphone with the Compact Framework V1 installed on it which include Windows Mobile 2003(inc SE) and Version 5 based phones!! As with the Smartphone SMSVoter application - no liability accepted, it's free and it does work:-)
As the name suggests is does conversions - it supports four types of conversions, each with up to 10 categories.
- Measures - 1 inch = 2.5 Centimetres etc
- Temperature - Celsius <-> Fahrenheit
- Stock Quotes - yeah, OK, not really a conversion, but handy and it fitted the data/user model well enough
See these Installation Locations.
To install, download (and unzip if you downloaded the .ZIP file), connect your Smartphone to your PC via ActiveSync and copy the Cab file to "\Windows\Start Menu\Accessories" directory, once copied then from your Smartphone navigate to the the Accessories menu and click on it to start the installation process. The application will appear on the Start Menu.
General information on "Convert It" can be found here including:-
- Installation Locations: Convert It Installation Locations
- Help: Convert It V2 Online Help
- Submitted Categories: Convert It 2.2+ Categories Submitted
- Change Log: Convert It Change Log
- XML Schema Definitions: Convert It 2.2+ XML Schema Definitions
- Future Versions: Convert It Future Versions
- Source Code: Convert It Source Code Locations
It's been written as a generalised "Ratio" converter, I've loaded up ratios for converting weights, distances and temperatures, but it's arbitrary, you could give it a ratio for "Pigs to a Pen" and it would convert it;-)
It also calls two Web Services, one for "Currency Rates" and the other for "Stock Quotes" - both services are provided by http://www.webservicex.net, and the results of this web services calls are saved locally for offline conversions.
The currency conversion works as follows:-
An arbitrary base reference currency is set and then all currency data is gathered relative to that base reference currency.
The default base reference currency is Euros, so for example to convert "£1 -> US$" I first convert the £1 to the base reference currency, in this case the Euro and then convert the Euro to the US Dollar, sounds convoluted but it works and means that you can pretty much do any to any currency conversion offline - important when you are shopping with limited data network coverage and obviously it's quick as it's all local data and local processing!!
Application Configuration and Customisation
Surprise surprise the whole application is configured using XML - almost nothing has been hard coded in to the application (except for Celsius <-> Fahrenheit which needs a constant) and all setting can be configured by editing the applications XML files.
The application is dependent on the Catalogue.XML file which describes the Conversion Categories, their Type, Display Name and the name of the XML document where the ratios are defined.
See Convert It 2.2+ XML Schema Definitions for more information on the schemas.
Blogs to come
I've got a blog in mind to write and it's basically what approach I take when writing applications for the Compact Framework. But it can be summarised as follows:-
- Read the article on Compact Framework and Garbage Collection, it's an excellent document!!
- Given that Compact Framework garbage collector is not as active as the garbage collector in the full framework, you really want to minimise the amount of garbage you create and this probably goes against general OO practices but I tend to make things I want to use a lot "Static" especially if they are an expensive objects to create. So if you do look at my source code and wonder why I make common execution paths static then the reason is to minimise garbage - from talking to folks at the PDC then this is the right approach - but if you have read this far and disagree then please post any comments you may have.