{"id":315,"date":"2012-01-06T11:56:09","date_gmt":"2012-01-06T16:56:09","guid":{"rendered":"http:\/\/www.cloppermillweather.org\/blog\/?p=315"},"modified":"2012-01-09T20:32:06","modified_gmt":"2012-01-10T01:32:06","slug":"happy-new-year","status":"publish","type":"post","link":"https:\/\/www.cloppermillweather.org\/blog\/2012\/01\/06\/happy-new-year\/","title":{"rendered":"Happy New Year"},"content":{"rendered":"<p>First off, I want to wish everybody a Happy New Year.\u00a0 Hope your holidays were good.<\/p>\n<p>I haven&#8217;t posted for a while and I thought it was time for an update.\u00a0 I&#8217;ve refactored all of my PHP code into classes so that it will be more object oriented.\u00a0 I created a test page to test every method of every class and got that working.\u00a0 Then I modified all of the pages to use the new classes, and to ensure that everything is properly separated, with the data in the PHP code and all formatting controlled by the Web pages.\u00a0 That is now completed and working n my test environment.<\/p>\n<p>All my Ajax code is currently developed by me, but I&#8217;ve been looking at some open source libraries, mainly Knockout and jQuery.\u00a0 Knockout is for data binding so that I can define fields on the Web pages and bind them to JavaScript classes that hold the data.\u00a0 I already have a framework in place that does this, but I&#8217;m looking into whether it is worth the effort to move to this open source Knockout framework.\u00a0 The same goes for jQuery.\u00a0 I could use it to send Ajax requests to the server in place of the code I already use.\u00a0 If I do decide to switch, now would be the best time as I plan to revise my JavaScript object model to match my PHP and Java code.<\/p>\n<p>Another issue I need to tackle is how to transfer the data from the PHP server code to the JavaScript client code.\u00a0 Currently I send an XML document with all the fields required by the user interface.\u00a0 I plan to divide this up into separate classes the same as my weather station software, as the classes are updated at different intervals.\u00a0 This would save on server round trips to pass data that I know hasn&#8217;t changed.\u00a0 I may also choose to use JSON to encode the data rather than XML.\u00a0 This will make things much easier on the client side.<\/p>\n<p>I&#8217;ll continue working and post another update soon.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>First off, I want to wish everybody a Happy New Year.\u00a0 Hope your holidays were good. I haven&#8217;t posted for a while and I thought it was time for an update.\u00a0 I&#8217;ve refactored all of my PHP code into classes &hellip; <a href=\"https:\/\/www.cloppermillweather.org\/blog\/2012\/01\/06\/happy-new-year\/\">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-315","post","type-post","status-publish","format-standard","hentry","category-weather"],"_links":{"self":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/315","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=315"}],"version-history":[{"count":0,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/posts\/315\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/media?parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/categories?post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloppermillweather.org\/blog\/wp-json\/wp\/v2\/tags?post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}