{"id":325,"date":"2012-01-12T21:00:43","date_gmt":"2012-01-13T02:00:43","guid":{"rendered":"http:\/\/www.cloppermillweather.org\/blog\/?p=325"},"modified":"2012-01-14T09:46:42","modified_gmt":"2012-01-14T14:46:42","slug":"knockout-update","status":"publish","type":"post","link":"https:\/\/www.cloppermillweather.org\/blog\/2012\/01\/12\/knockout-update\/","title":{"rendered":"Knockout Update"},"content":{"rendered":"<p>I&#8217;ve spent a lot more time working with jQuery and Knockout.\u00a0 They both work very well.\u00a0 I&#8217;ve modified almost all of my pages to use them (in my test environment).\u00a0 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.<\/p>\n<p>While making the changes I learned a few things worth sharing.<\/p>\n<p>1. I have a mobile page at <a title=\"mobile web page\" href=\"http:\/\/www.cloppermillweather.org\/mobile.php\" target=\"_blank\">http:\/\/www.cloppermillweather.org\/mobile.php<\/a>.\u00a0 The Knockout code was failing and at first I had a hard time working out why.\u00a0 Eventually I narrowed it down to displaying dates.\u00a0 I was able to display dates fine in IE and Firefox, but on the Android browser it failed.\u00a0 It turns out that the Android browser JavaScript engine doesn&#8217;t parse ISO 8601 dates.\u00a0 I wrote a very basic parser and it now works fine.<\/p>\n<p>2. Splitting up my data into separate models with different update schedules helped to speed up Ajax updates.\u00a0 This wasn&#8217;t unexpected as I&#8217;m now transferring the bulk of the data from the server to the browser less often.<\/p>\n<p>3. Trying to parse a full day&#8217;s history is too much to try and do on the client within the browser.\u00a0 I quickly changed that plan to only transfer the history I actually display on the statistics page.\u00a0 If I choose to add more history fields to that page I&#8217;ll need to update my page that transfers the JSON data.\u00a0 This doesn&#8217;t affect my history Web page, as that page is formatted on the server and isn&#8217;t updated dynamically.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve spent a lot more time working with jQuery and Knockout.\u00a0 They both work very well.\u00a0 I&#8217;ve modified almost all of my pages to use them (in my test environment).\u00a0 I also added a few new features to my mobile &hellip; <a href=\"https:\/\/www.cloppermillweather.org\/blog\/2012\/01\/12\/knockout-update\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-325","post","type-post","status-publish","format-standard","hentry","category-weather"],"_links":{"self":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/comments?post=325"}],"version-history":[{"count":0,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/325\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/media?parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/categories?post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/tags?post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}