{"id":3994,"date":"2013-12-16T13:40:51","date_gmt":"2013-12-16T18:40:51","guid":{"rendered":"http:\/\/www.lordandrei.com\/blog\/?p=3994"},"modified":"2013-12-16T13:40:51","modified_gmt":"2013-12-16T18:40:51","slug":"project-update-json-and-other-fun-with-data-models","status":"publish","type":"post","link":"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/","title":{"rendered":"Project Update: JSON and other fun with data models."},"content":{"rendered":"<p>Fear not friends, there will be a SingOff post or two today.<\/p>\n<p>Today I&#8217;ve been working on the back end of my software. UI is one thing, but you can only get so far with &#8216;<a href=\"http:\/\/en.wikipedia.org\/wiki\/Lorem_ipsum\">lorem ipsum<\/a>&#8216; data. Well, okay&#8230; in my case some fake data that sort of fits the project. So today, I started the process of moving from fake data to real data. This is always an iterative process that programmers and project designers know far too well.<\/p>\n<p>First we sketch out what we think is the data we want. I usually jump from a text editor to a spread sheet. I realise this would probably be better right off the bat with a database; but that&#8217;s just crazy talk. I start out by trying to map out my main object (not really <a href=\"http:\/\/en.wikipedia.org\/wiki\/Database_normalization\">normalised<\/a> at this point) and then make one or two side objects where I think they will need to stand off by themselves. With this model\u00a0we build up some quick code to insert data by hand to have it generate out into a couple of different formats: (CSV, XML, JSON, etc) This allows me to easily re-use this data once output.<\/p>\n<p>Now I go looking for actual data. I know what data I&#8217;m working with, so finding sample data on the interwebz is fairly easy. HOWEVER, and that&#8217;s a big however; once you start looking at real data and trying to shoehorn it into your model; you begin to realise exactly how limited your model is and where you need to make fixes. (This is why lorem ipsum only gets you so far).<\/p>\n<p>Unfortunately, I need about 10 entries to work with the data correctly and each entry is about 60 lines\/2000 characters of hand transposed data. (The whole database side of things happens once I am happy with what I have.) Oh, did I mention&#8230; if there is ANYONE reading who knows how to go from MySQL through REST calls into a JSON output (preferably using Tomcat) I may have some work\/hobby time for you? Not kidding here. Also, if anyone knows a service that does this (with load balancing, metrics, yadda yadda yadda) comments welcome&#8230; knowledge dump will be appreciated\/rewarded (eventually)<\/p>\n<p>So, currently I&#8217;m up to 3 records. I&#8217;ll be working this afternoon on the other 7. Now that the first part is done, each record takes about 5-10 minutes to research and build up. Then I turn the whole monster around and have the Project import and use the data. That&#8217;s when things start to get &#8216;exciting.&#8217;<\/p>\n<p>Those who I talked to informally about &#8220;The Project&#8221; should feel free to message me if they want details or are interested in some questions.<\/p>\n<p>Until later&#8230; having fun and making great progress!<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-3994\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-3994\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-3994\" class=\"share-pinterest sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Pinterest (Opens in new window)<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Tumblr (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Fear not friends, there will be a SingOff post or two today. Today I&#8217;ve been working on the back end of my software. UI is one thing, but you can only get so far with &#8216;lorem ipsum&#8216; data. Well, okay&#8230; in my case some fake data that sort of fits the project. So today, I [&hellip;]<\/p>\n<div class=\"sharedaddy sd-sharing-enabled\"><div class=\"robots-nocontent sd-block sd-social sd-social-icon sd-sharing\"><h3 class=\"sd-title\">Share this:<\/h3><div class=\"sd-content\"><ul><li class=\"share-facebook\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-facebook-3994\" class=\"share-facebook sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=facebook\" target=\"_blank\" title=\"Click to share on Facebook\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Facebook (Opens in new window)<\/span><\/a><\/li><li class=\"share-twitter\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-twitter-3994\" class=\"share-twitter sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=twitter\" target=\"_blank\" title=\"Click to share on Twitter\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Twitter (Opens in new window)<\/span><\/a><\/li><li class=\"share-pinterest\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"sharing-pinterest-3994\" class=\"share-pinterest sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=pinterest\" target=\"_blank\" title=\"Click to share on Pinterest\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Pinterest (Opens in new window)<\/span><\/a><\/li><li class=\"share-tumblr\"><a rel=\"nofollow noopener noreferrer\" data-shared=\"\" class=\"share-tumblr sd-button share-icon no-text\" href=\"http:\/\/www.lordandrei.com\/blog\/2013\/12\/16\/project-update-json-and-other-fun-with-data-models\/?share=tumblr\" target=\"_blank\" title=\"Click to share on Tumblr\" ><span><\/span><span class=\"sharing-screen-reader-text\">Click to share on Tumblr (Opens in new window)<\/span><\/a><\/li><li class=\"share-end\"><\/li><\/ul><\/div><\/div><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_publicize_message":"Project Update: JSON and other fun with data models. http:\/\/wp.me\/p1X6ba-12q","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[1373,9],"tags":[711,1380,1371,190,7,1379,1370,1381],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1X6ba-12q","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/posts\/3994"}],"collection":[{"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/comments?post=3994"}],"version-history":[{"count":1,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/posts\/3994\/revisions"}],"predecessor-version":[{"id":3995,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/posts\/3994\/revisions\/3995"}],"wp:attachment":[{"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/media?parent=3994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/categories?post=3994"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.lordandrei.com\/blog\/wp-json\/wp\/v2\/tags?post=3994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}