First page Back Continue Last page Text

Notes:


14/ So now, let's push forward the idea. Let's build a CMS in html5. Here is the architecture. CMS interact with jIO. jIO store and fetch data from LocalStorage, Qiniu... using its connector.

(I go to browser and show CMS in JS) A Title, a list of document. If I click a document, I get its content. So let's see how it is made. (I show source code). Small html5. I import jIO libraries, have a tilte, two elements (one for index, one for content), and I call a script. Let's see the script.

Here is how I configure my jIO storage using local storage (I previously pushed document in it, so no function to push it). Here I create (not used). Here I fetch documents, Here I build index, Here I display content. Now I'd like to show you how it works in live. (I go back to website, open developer console. I copy configuration. create storage, push document, reload, here it is). Now I'll do the same with Qiniu, for that I need to modify the JS code. My website is host in SlapRunner PaaS, the same we run on rikomagic server and it is being deployed at Hangzhou Dianzi University. Here it is. In it I can monitor process, deploy new component, etc... Here I'll use the file manager to acces and modify my JS. (I open the JS file). I have a confession to make, I do not know how Qiniu API works, but I copied configuration and file from the task manager here. (I do the change to use Qiniu by only uncommenting Qiniu configuration and commenting local storage configuration, save, reload). Here is the data, it is different. Now, I'll add a document. (I open console and do. I reload) Here it is, new document is also in Qiniu. So I built a simple CMS in JS using Qiniu as a remote storage, and you see that If I want to use another storage I just change my jIO configuration, the application code never change.