Virtual Filesystem in Smart Mobile Studio
Storage and HTML5, say what you will but it’s not exactly optimal. In essence storage can be reduced to “read everything, but unless you have special access rights, you cant touch a single file”. Well this is true, a hundred-fold for mobile developers.
In order to make things easy to work with QTX will introduce what is known as a virtual filesystem. In short it allows you to save X number of files, whatever they may be, into a single JSON serializable object. This object can then be stored either in local-storage, global-storage and even a database.
While it doesn’t change the fact that you can’t touch the filesystem from the browser, it will at least make it easy to generate and save data when your application runs. It will be especially useful for mobile development since phonegap removes the size limitations desktop browser enforce.
Also, making a “filesystem editor” program which allows you to create package files (think zip files here) which can be included with your smart applications as a resource — well, it wont be hard to achieve. And it doesnt violate any browser rules either, as long as you understand that you cant write to it, unless you store it in local-storage or some other browser friendly target that is.
The core of the system is abstract, meaning that it can be made to read and write data to anything. Why not code an FTP client using web-sockets? Then a virtual filesystem class will be very handy indeed!
Or perhaps you want to interface with dropbox or your google drive? Again being able to plug a virtual filesystem on top of such a system can be valuable.
If you want to check out the code, head over to google code and preview qtx.storage.pas. It’s still early in development but it will be finished quite soon.