Converter

Click here to visit converter.

The Assignment

Basically the assignment was to produce a PHP program that could convert meters to feet, Celsius to Fahrenheit and pounds to inches. This program should dynamically generate a site index, be valid xhtml strict, follow CRAP design principles and be easy to use.

My Approach

Having already done a fair amount of PHP this exercise would have taught me nothing. I decided to move it up a few notches.

I decided that I would use AJAX, since I’d done no AJAX before this would provide me with a learning experience.

I ran into a few problems that made me differentiate from my normal approach. My first idea was to put the conversions into a MySQL database and load into my app. Unfortunately the machine that I was required to host on did have an SQL server installed. This meant I had to put the config in some kinda text file. Since this data wouldn’t be changing often I simply dumped it all into a bunch of PHP Variables.

Soon I had the application up and running. In my class a bunch of people were commenting on my theme (at the time it was Sunset) and saying how bad it looked. I experimented with the navigation bar on the right (Lord loves a leftie), with different colours (Something Blue, Green with envy) and also with new logos (Blue Too, May Tricks). I didn’t want to throw away all the work I’d done on all the different themes so I added a theme changer that basically changes the CSS file that is referred to. This made it possible to include themes from other sources so Cleo and Shaun offered to do a theme for me.

The Final Product

The site you see today is practically unchanged from what I submitted. I’ve only added a few units. The Data section was added when I started using the site myself, its a good way to check how big a hard drive that you buy will really be (gigabytes to gibibytes). I was very surprised when I myself actually started using my own project!