I'm working on a web app using eclipse and gwt. I need to store some data. If I was building this for android, I'd use an sqlite db. But I'm making this for a Chrome Packaged App, the data needs to be stored with the client and remain there. I can't think of what to search for, does anybody have an example or tutorial or guidance? thanks
If you are allowed to use HTML5, Local storage will suit you best.
More info here and here.
GWT actually already has this.
Check it out:
http://code.google.com/webtoolkit/doc/latest/DevGuideHtml5Storage.html
You have tagged this as HTML 5 so I suggest trying localStorage?
The Chrome browser supports sqlite as well; should work more or less straight out of the box (at least it does for my apps). At least on modern Chrome releases.
Because you're building a Chrome Packaged App, you can use any storage API supported by Chrome. That includes Web Storage and Web Database, as others have already said, but also (on recent versions of Chrome, so it depends on your schedule) File API and Indexed DB.
Everything you can do in JS, you can do it in GWT.
As others have said, GWT gives you built-in access to Web Storage. The gwt-mobile-webkit project brings you Web Database. If you prefer the File API or Indexed DB, then you can use JSNI to access them from your GWT code (unless someone else already wrote a wrapper library).
If you choose the Web Database (which is just SQLite accessible from JS), you might want to set the unlimitedStorage permission.
Related
I recently found that Facebook App (for Android & iOS, but i'm using Android anyway) downloads almost all friends' information (including FB ID and real e-mail account) to a SQLite database called fb.db. I am trying to do the same thing programmaticaly (using python, perl, bash etc) but with no luck so far. I need a way that will do similar requests with FB APP, and will download all of my friends' info upon login, just like the way FB APP work.
I tried so far to:
Decompile com.facebook.katana and see how it's done - No luck (or just missed it).
Sniff the facebook app with burp - No luck (due to SSL and app's protection when certs have been changed)
I am sure you went through this: http://developer.android.com/guide/topics/data/data-storage.html#db
There it is stated:
Android provides full support for SQLite databases. Any databases you create will be accessible by name to any class in the application, but not outside the application.
It was not the answer, it was just a text, which states that you can create a database for your web app. But unfortunately they are not providing any kind of helping material about writing and removing the data from that Database. So lets move to another source!
Related posts:
Please read this:
How to insert data into SQLite database in android?
There is a sweet example of how to add the content to a database in Android.
There is another example on this question too, Downloading data/content into Sqlite database
Why they didn't work:
Decompiling won't work! As they might have editted the app to be only fb-developer-readable on the first place. So you will never have success this way.
And the second thing is same.
All you can do, is to guess the algorithm or ask for it here: http://programmers.stackexchange.com and give it a try from scratch! :)
Suggestions:
I would try to recommend you to first learn how to:
Access Data connection on the phone.
Access the server from where to download the data.
Create a string or what ever data type to be inserted in database.
Create the connection, and save the data there!
I would now assume that you are a beginner, and want a tutorial! Then the first guess could be to visit their own project sites (SQLite, Android). Visit the developer network. And look for what you get!
Good luck buddy! Cheers.
I need the following functionalities over HTTP.
Does WebDAV provides this functionality and are there any known gotchas?
I am planning to access WebDAV from an IPad/IPhone application. Are there any known limitation in accessing WebDAV in iOS?
READ
WRITE (Create directory, Create a file, Update existing file)
DELETE (File and Directory)
GET DIRECTORY LISTING
WebDAV has all those features. I don't know if there's specific iOS limitations, but there are other WebDAV apps, so I assume you can make it work :)
There's a few good options
Schimera Navigator is known to work,although i've heard of at least some users having problems logging in due to the case of their user name being changed by auto complete. The developer says a fix is coming for that
This video shows another approach - http://youtu.be/4ZYqLBEayrk?t=3m18s
Do I need to implement my own sync methods in order to make an offline web app (html+css+js) stay up to date with changes made on the server (and viceversa)? I'm using MySQL on the server side.
I read Two-way sync between iPhone application and web application with some pointers but I think they're talking about native applications when they mention CFUUIDCreate and I wander if this is possible for the Web.
Does someone have some code to share or maybe can point me in the right direction?
Thank you!
P.S.: I hope my english is not that rusty ;)
To store static contents on the client-side, as Jethro Larson said, the Application Cache Manifest is the way to go to cache the static contents of your website (HTML, CSS, JS and images).
To handle dynamically generated contents offline, you can use javascript templates. There are several solutions for this.
To sync the two databases, there is a project called persistence.js (persistencejs.org) which is a javascript library which offers a unique API to work with WebSQL databases, Local Storage, etc. They have a plugin for this library called persistence.sync (persistencejs.org/plugin/sync) which syncs the remote database with the server's one. It consists of POST and GET requests to a specific url that you can configure (for example yourapp.dev/sync). They have an example back-end written in node.js and here is one for Rails. It's simple to understand and persistence.sync is well documented.
Look at the offline cache:
http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/
http://www.google.com/search?q=offline+cache+html5
http://www.slideshare.net/search/slideshow?q=offline+cache
I would like my iPhone app to get dynamic content off the net. This content should be managed using a CMS. I would like to know in particular if I can setup Drupal or Joomla or other CMS as a backend for my iphone app to get the content.
Any advice on how this can be achieved would be helpful.
I am completely new to setting up/using CMS.
You can also take a look at StorageRoom, which is a CMS for Mobile Applications.
Disclaimer: I created this myself to scratch my own itch.
Wordpress with the JSON-API plugin is a great solution, especially if you need a web site as well.
You can find a good example here that uses Wordpress and Phonegap to get a basic app going.
If you can access the content in any serialized format (e.g. XML or JSON), it should be no problem to use any CMS as a "backend" for your application.
I'm checking out storageroom, and I'm searching for a similar answer, but I also found osmek to be a bit promising. I might use that one because of the menu templates .Osmek can provide responses in json and xml (and other formats that aren't useful in iphone dev like php, html, and templates)
Feed.Us is another option. I have a series of travel guides iphone apps and use Feed.Us to manage the businesses listed within the apps.
It creates a URL with XML that gets imported into the app.
This seems to be a very promising solution!
Apache Usergrid
I have briefly tried DreamFactory for some trial project but never got around to using it in production. Usergrid seems to be in the right direction in providing a full fledged solution (which can also work for modern web apps)
I'm very curious about Helios (helios.io) and will be trying it out shortly.
At least from the write-up on their site it looks very promising. Its open source, and in beta currently. They also have very easy heroku hosting support.
Helios is an open-source framework that provides essential backend
services for iOS apps, from data synchronization and push
notifications to in-app purchases and passbook integration.
I will update the answer again once I use this for some test project.
you can use any cms or framework to implement this. you need to make a jsonm api to communicate between app and backend server.
For php cms joomla, drupal and wordpress are best.
in frameworks you can use yii, cakephp, laravel or zend
hope this helps..
Also worth taking a look at Cloud CMS:
http://www.cloudcms.com
It's a cloud content management system for mobile and web applications, entirely oriented around JSON and having a fast, fully featured API. Your iOS application could easily grab things, render them, capture data, store it back into the CMS and more. Plus, it gives you a user interface you can drop in front of your business users so that they can create, edit and review things.
Note: I'm one of the developers. That said, worth checking out if for no other reason than for inspiration.
Depending on the data-complexity, perhaps willing a CMS into being a data-store or simple API is overkill when you can leverage file storage services like Google Drive/Apps to GET/POST spreadsheets or other documents in JSON, among other formats.
Is it possible to use Dropbox, Google Drive, Skydrive, etc. as a server space?
i am sapna.and we have to develop an application in an iphone having features:-
Identifies a unique user and captures profile.
Admin module / configuration module to assist user define the data points and their bound values.
Support of upto 250 data points to monitor, and monitor upto 50 on the client side
Provide tabbed interface with not more than 10 points of data grouped in a single tab / tag
Output to be generated in text and graphical form
Support iphone features of touch etc
Web service to retrieve point data from the database.
we have learnt that mac os and iphone sdk is required.now for data transfer what is reqiured ? is it API.or web services.what is reqiured.what topics ahoulkd be studied for developing this project.i am fully new to this domain.waiting for your reply.
HTTP rest requests are very easy, and can be architected as non-blocking on the client side. The iPhone has minimal support for XML and JSON is far easier (IMHO) using one of the json libraries such as those here.
You may want to use the deviceID as the unique user identifier (depends on your definition of unique I guess)
To learn iPhone programming, I can highly recommend the CS193P course available (at the moment) on iTunesU.
For web transfers, you can do HTTP REST very easily so I would architect your server side to talk very simple HTTP. There is built-in support for XML, but you will have to parse results from the server manually.
For Tab UI support, you can just look at the examples included in the SDK, it's not difficult.
For graphical output, you will want to create your own UIViews that override the draw function. You will have to learn the CoreData API in order to produce high-quality renderings.
If you are new to this, and are more familiar with C# or even Java, I highly recommend looking at the MonoTouch system.
First of all u need a Mac based system and the iPhone SDK installed. I think you are trying to make an iphone version of the web application. it will be better for you to download the MAMP(Macintosh Apache MySQL PHP) Server and install it to debug your application. its simply the mac version of WAMP and LAMP. (hope you are familiar with PHP).
You can then configure you MAMP for debugging and once the debug is complete you can host these PHP files to the actual server.
Remember, you need to get the results from the server in the XML format. and you need to write code to parse the XML you generated at the server.
Hope this information is helpful.