{"id":4911,"date":"2013-04-03T08:18:57","date_gmt":"2013-04-03T15:18:57","guid":{"rendered":"http:\/\/localhost\/exoblog\/?p=4911"},"modified":"2013-04-03T08:18:57","modified_gmt":"2013-04-03T15:18:57","slug":"document-management-add-on-faster-than-ever","status":"publish","type":"post","link":"https:\/\/www.exoplatform.com\/blog\/document-management-add-on-faster-than-ever\/","title":{"rendered":"Document Management Add-on Faster than Ever"},"content":{"rendered":"<p>Wouldn&#8217;t it be cool to see updates from other users in real time (or near to real time)? No browser refresh, nothing to do: they would just appear all by themselves.<\/p>\n<p>A few months ago, I published an initial post about the Documents Add-on; you can read it here <a href=\"https:\/\/www.exoplatform.com\/blog\/developing-a-simple-document-management-exo-add-on\/\" target=\"_blank\" rel=\"noopener\">Developing a Simple Document Management eXo Add-on<\/a>.<\/p>\n<p>Since then, I have added a lot of new features:<\/p>\n<ul>\n<li>Support for Microsoft Office and Open Office documents (requested by the community)<\/li>\n<li>Folder support (requested by the community)<\/li>\n<li>Internationalization: English and French translations<\/li>\n<li>Bookmark compliant<\/li>\n<li>Design updated for Retina displays<\/li>\n<li>Auto refresh<\/li>\n<li>Local storage<\/li>\n<\/ul>\n<p>In the video bellow, I will focus on the last two but you will be able to get a preview of some of the others as well.<\/p>\n<p><!--more--><\/p>\n<h2>Local Storage<\/h2>\n<p>Basically, what we call local storage is the capacity for your browser to store data locally. You&#8217;ve heard about cookies? Local storage in HTML5 is like &#8220;cookies on steroids&#8221; \ud83d\ude42 It allows us to store a large amount of data. Just to take one example, GMail uses it to store all your emails locally so you don&#8217;t have to download them from the server each time you want to view an email. Local storage is the first step to offline mode, where you don&#8217;t need an internet connection since everything is stored locally and synced back to the server when you get an internet connection.<\/p>\n<h2>Auto Refresh and Local Storage<\/h2>\n<p>So, wouldn&#8217;t it be cool to see updates from other users in real time (or near to real time)? No browser refresh, nothing to do: the updates would just appear all by themselves.<\/p>\n<p>Thanks to the new local storage feature, this is now possible &#8211; but how?<\/p>\n<p>Without local storage, I would have to call the server every few seconds, download the contents from my current folder and refresh it, right?<\/p>\n<p>Well, I could do that but it would certainly slow the server down&#8230; unless I do a very simple check.<\/p>\n<p>So, what I do is store all my folders in the browser&#8217;s local database when I access them and update them only when something changes. If a folder doesn&#8217;t change, I can continue to use my files, but I won&#8217;t make even one single call to the server (except for timestamp checks). Technically speaking, a timestamp check is one property read of the Content Repository (you can&#8217;t do anything simpler \ud83d\ude42<\/p>\n<h2>Demonstration<\/h2>\n<p>So, what does it look like in a real-life scenario &#8211; watch the video to find out!<\/p>\n<h2>What\u2019s Next?<\/h2>\n<p>In the next few days, I will publish one more post about the technology I use to manage all of this.<\/p>\n<p><em>Thanks for watching and stay tuned \u2013 more improvements are on the way, Benjamin.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"Wouldn&#8217;t it be cool to see updates from other users in real time (or near to real time)? No browser refresh, nothing to do: they would just appear all by themselves. A few months ago, I published an initial post about the Documents Add-on; you can read it here Developing a Simple Document Management eXo [&hellip;]","protected":false},"author":7,"featured_media":12746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[699],"tags":[],"lang":"en","translations":{"en":4911},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/4911"}],"collection":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/comments?post=4911"}],"version-history":[{"count":0,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/4911\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media?parent=4911"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/categories?post=4911"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/tags?post=4911"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}