{"id":382,"date":"2009-06-17T01:22:30","date_gmt":"2009-06-17T05:22:30","guid":{"rendered":"http:\/\/patorjk.com\/blog\/?p=382"},"modified":"2014-01-25T17:53:52","modified_gmt":"2014-01-25T21:53:52","slug":"web-app-versioning","status":"publish","type":"post","link":"https:\/\/patorjk.com\/blog\/2009\/06\/17\/web-app-versioning\/","title":{"rendered":"Dogs Days of Summer and Web App Versioning"},"content":{"rendered":"<figure style=\"width: 500px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" alt=\"Rising Sun\" src=\"http:\/\/patorjk.com\/images\/blog-2009\/clip-art-rising-sun.png\" title=\"Rising Sun\" width=\"500\" height=\"154\" \/><figcaption class=\"wp-caption-text\">Rising Sun<\/figcaption><\/figure>\n<p>I can&#8217;t remember a time when I was so exhausted. I&#8217;ve moved into my new townhouse, though it still feels like there&#8217;s a ton of stuff to do for it. I also got engaged recently, and even though the date is a year away it seems like there is a lot to do for it. I&#8217;ve also been working 50-55 hour weeks at work the past few weeks, usually leaving work around 10pm. That last one isn&#8217;t too bad, since I&#8217;m getting overtime and I know people who&#8217;ve done much worse (I have a friend who told me he once did a 27 hour a day). However, it&#8217;s all left me a little worn out. However, I&#8217;ve still kept this site in my thoughts.<\/p>\n<p>One behind the scenes thing I decided to look into was web app versioning. Sometimes I want to make a small update a program like <a href=\"http:\/\/patorjk.com\/software\/taag\/\">Text Ascii Art Generator (TAAG)<\/a>, where I might need to change 3 or 4 files, yet if the user has certain files cached, the mish-mash of certain new and old files could cause the program not to work. There may be some obvious way of doing versioning that I&#8217;m just not aware of, but its something that&#8217;s bugged me for a while. I had been getting around this issue by naming the files I wanted to update something different (ex: font-settings-v1.htm became font-settings-v2.htm, etc), however, this seemed a rather messy way of doing it. <\/p>\n<p>Recently I decided to put the whole app except for its index.htm file under a directory representing its version, and having the index.htm point to the sub-directories under the latest version. So the apps contents would be placed in a structure like this:<\/p>\n<p>patorjk.com\/software\/taag\/1.0.0\/pages\/ &#8211; Pages for the app<br \/>\npatorjk.com\/software\/taag\/1.0.0\/css\/ &#8211; CSS files<br \/>\npatorjk.com\/software\/taag\/1.0.0\/scripts\/ &#8211; Scripts<br \/>\npatorjk.com\/software\/taag\/ &#8211; Where the index.htm file would go<\/p>\n<p>This is nice because it allows me to go back in time if I screw something up. For example, if I decided I didn&#8217;t like version 1.0.1 of the app, I could go back to version 1.0.0 by just changing the index.htm file. This method also prevents any kind of awkward file combination due to cached files. However, it&#8217;s down sides are that I have to upload a whole new version of the app every time I update and I need to make sure users aren&#8217;t linking to or bookmarking pages underneath the version sub-folder. The app has to be set up so that the version folder is invisible &#8211; everything has to happen through the page at the base directory. This is so search engines wont index every single little version of the app.<\/p>\n<p>So far this system seems to work pretty well, however, if anyone has any suggestions let me know.<\/p>\n<p>In the weeks to come&#8230;<\/p>\n<p>I imagine my free time to be kind of scarce for a while, but I have some ideas I want to work on, so updates will keep coming, but probably in a more sporadic manner.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I can&#8217;t remember a time when I was so exhausted. I&#8217;ve moved into my new townhouse, though it still feels like there&#8217;s a ton of stuff to do for it. I also got engaged recently, and even though the date is a year away it seems like there is a lot to do for it. &hellip; <a href=\"https:\/\/patorjk.com\/blog\/2009\/06\/17\/web-app-versioning\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Dogs Days of Summer and Web App Versioning<\/span> <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":[24,26],"tags":[],"class_list":["post-382","post","type-post","status-publish","format-standard","hentry","category-personal","category-web-apps"],"_links":{"self":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/382","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/comments?post=382"}],"version-history":[{"count":7,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/382\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/posts\/382\/revisions\/468"}],"wp:attachment":[{"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/media?parent=382"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/categories?post=382"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patorjk.com\/blog\/wp-json\/wp\/v2\/tags?post=382"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}