- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a big question regarding to "write to" and using this program. I'm attempting to create an app using this program - but I am still uncertain on how to proceed. Suppose I wanted to use an app and use it to collect data (varying from account information to inputs), and I understand that I need to use "write to' to accomplish that.
What I don't understand is how to approach it. I understand that we need a server of some sort to collect data. I understand write to function as creating or opening file then write into the file. But I want to test some codes and practice using this technique and use the code to implement creating files using app I'll be making. I can't get server yet but would like to "prepare" for it if possible. So how do we practice and code to store files before actually use the server?
I'm ok if I could save data via my computer desktop or something like that. But I don't know how to get around on that using XDK and creating app (then tested on my iPad) without using actual server - for testing/learning purpose.
Thank you
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe this link might have your answer.
http://qnimate.com/working-with-file-system-using-intel-xdk/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. That link looks very helpful! I will try and create a demo with just this to test.
I have one question. If I use filesystem.root using iPad as demo - where would the file appear? In iPad or would it transfer to my laptop somewhere? I just want to know where to look so I can confirm the result had succeed or not.
Again, thank you!
Edit; I ran into error of localfilesystem not defined. I've added script to load the filesystem.js as well to help but doesn't work. I have no idea how to proceed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you need to keep data locally, in the app, then there are several solutions:
- localStorage, an HTML 5 API - https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
- The Cordova File API http://docs.phonegap.com/en/edge/cordova_file_file.md.html
- Indexed DB: https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API
If you need to keep it on a remote server, then the very simplest solution is to use something like Parse.com, Kinvey,com or one of their many competitors. These are for-pay services that manage data storage, user authorization, and more. Parse and Kinvey are really powerful and easy. Highly recommended if you are not familiar with server side development.
Otherwise, you will need to run your own HTTP server with your own code for collecting and storing that data. There are dozens of decisions to make (hosting, OS for server, HTTP stack, Database, security, what languages to employ, CORS, etc etc) and a lot of material to master. Heroku, Amazon, Rackspace are the big names in this field, but there are thousands of other routes and options.
Hope this helps,
Chris
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page