Knockout Update

I’ve spent a lot more time working with jQuery and Knockout.  They both work very well.  I’ve modified almost all of my pages to use them (in my test environment).  I also added a few new features to my mobile Web page. I hope to have all of this ready to be released by the end of this weekend.

While making the changes I learned a few things worth sharing.

1. I have a mobile page at http://www.cloppermillweather.org/mobile.php.  The Knockout code was failing and at first I had a hard time working out why.  Eventually I narrowed it down to displaying dates.  I was able to display dates fine in IE and Firefox, but on the Android browser it failed.  It turns out that the Android browser JavaScript engine doesn’t parse ISO 8601 dates.  I wrote a very basic parser and it now works fine.

2. Splitting up my data into separate models with different update schedules helped to speed up Ajax updates.  This wasn’t unexpected as I’m now transferring the bulk of the data from the server to the browser less often.

3. Trying to parse a full day’s history is too much to try and do on the client within the browser.  I quickly changed that plan to only transfer the history I actually display on the statistics page.  If I choose to add more history fields to that page I’ll need to update my page that transfers the JSON data.  This doesn’t affect my history Web page, as that page is formatted on the server and isn’t updated dynamically.