How to do online/offline sync with a ruby on rails application? - ruby-on-rails

Is there any way to do offline syncing with a rails project?
In other words, our client is using their site to show a photo gallery, but they need to be able to do it without an active internet connection. At any time, they can get back online - and download any new data - to be able to continue showing their gallery?
Thanks!

You will have to make a javascript client application, that stores changes and state inside the HTML5 local storage. So for the user he can do actions, which can be saved/synced later to the server (e.g. when he is connected to the internet again).
Sproutcore would be ideal for this. I am not sure if any of the up and coming javascript libraries (Backbone.js, spine.js) interact with local storage.
Hope this helps.

I have decided to use rack-offline, but no one answered it.
It can be found at github if anyone is interested.

Related

Best option for storing external database for iOS app

I am working on an app that will access an external database that needs to be able to load quickly. This is our own database, and the issue is where to store it for the fastest loading time. Currently, the database resides on a wpengine website, but it loads very slowly. One option is uploading a .plist file sporadically to the user's app when new data is available; it seems like that might not be very secure - although it would probably make accessing the data lightning fast. I was thinking that possibly CloudKit shared storage would be the best place to store the data if I wanted to keep it fast and also keep users from viewing it directly. I would appreciate any thoughts or suggestions.
As far as I understand, CloudKit will be OK for you. You can have a look at NSHipster's excellent summary here.
You also have a link to a tutorial in the comments above. If you want to discuss it further, don't hesitate to contact me through chat.

Making app for Offline Browsing

I am new to objective c and still learning. I am making an app for my project in which user can download the whole website or webpage for later browsing..so i need some guidance, so if any one can give some suggestion that would be great
There are many ways to achieve what you asked for. Either by saving the websites data in temporary folder or you may save the whole site as pdf.

Sharing a Realm Database between a user's devices

Is there a formal way for a Realm Database to be shared between a users iPhone and iPad? Clearly that will need some kind of server that a database can be pushed and pulled from. Is there a solution for this, like is there a way to use iCloud?
If not does anyone one have any ideas for a path of least resistance for implementing this myself?
Found this chat on the Realm's GitHub page
https://github.com/realm/realm-cocoa/issues/913
I am still hoping someone here has got around this issue?
Realm hasn't provided sync feature yet. We are actively working on sync building feature, but we don't have no ETA at the moment.
Easy ways are sharing Realm data file with iCloud or other services. e.g. DropBox API.
https://www.dropbox.com/developers
Or this library might help you...? https://github.com/BellAppLab/RealmCloudKit
Second, using serverside database to sync with local database. Like Parse.com.
https://parse.com/

Is hosting JSON files used by my iphone app on 3rd party servers a good idea?

Here's the thing, I'm thinking of adding some "self-updating" properties to my app, which will enable the app to update it's contents every month. My current website was built using squarespace, which doesn't support file hosting. I really don't want to shell out money for another domain just for the sake of a monthly JSON file.
Are there any 3rd party providers that have this service? Such that all I need to do is upload my JSON file and get my URL? Is this a good idea?
Any help welcome.
Thanks.
Why don't you use a free service like StackMob to build your database online? This way you can update the data whenever you want. You might even build an app or a script to update the data easily and automatically.

Saving & Restoring Connections with XIFF

I'm modifying a piece of JavaScript code that uses XMPP + XIFF flash object to communication with MSN/Yahoo/GTalk via Jabber.
The requirement of the web site is to enable page refreshes.
However, the problem is the current implementation of XIFF does not allow saving and restoring of connection, but requires a new login every time, which is time consuming.
I wasn't able to find any reference to such a solution.
Does anyone know if:
This is at all possible with the XIFF open source code?
Any reference to such solution - might consider JavaScript solution as well.
Thank you very much!
Ofer Bar
I do not believe this is possible. Standard work-arounds are to either have a separate window, or some form of IFRAME which acts as such.

Resources