简体   繁体   English

如何与Rails应用程序上的ruby在线/离线同步?

[英]How to do online/offline sync with a ruby on rails application?

Is there any way to do offline syncing with a rails project? 有什么办法可以与Rails项目进行离线同步吗?

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. 您将必须制作一个javascript客户端应用程序,该应用程序将更改和状态存储在HTML5本地存储中。 So for the user he can do actions, which can be saved/synced later to the server (eg when he is connected to the internet again). 因此,对于用户而言,他可以执行操作,这些操作可以稍后保存/同步到服务器(例如,当他再次连接到Internet时)。

Sproutcore would be ideal for this. Sproutcore将是理想的选择。 I am not sure if any of the up and coming javascript libraries (Backbone.js, spine.js) interact with local storage. 我不确定任何新出现的javascript库(Backbone.js,spine.js)是否与本地存储交互。

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. 如果有人感兴趣,可以在github上找到它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM