离线网络应用 [英] Offline web application

查看:69
本文介绍了离线网络应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑构建一个支持离线功能的Web应用程序.

I’m thinking about building an offline-enabled web application.

我正在考虑的架构如下:
Web服务器(远程)<-> Web服务器/缓存(本地)<->浏览器/Prism

The architecture I’m considering is as follows:
Web server (remote) <--> Web server/cache (local) <--> Browser/Prism

我为该模型设想的优势是:

The advantages I envision for this model are:

  • 部署是基于Web的,具有此方法的所有优点
  • 已启用离线
  • UI(html/js)同步不是问题
  • 数据同步几乎可以自动化
    • 只要我停留在RESTful范式之内
    • 我可以根据需要取消此操作,但是手动同步在很大程度上仍将是外科手术
    • Deployment is web-based, with all the advantages of this approach
    • Offline-enabled
    • UI (html/js) synchronization is a non-issue
    • Data synchronization can be mostly automated
      • as long as I stay within a RESTful paradigm
      • I can break this as required but manual synchronization would largely remain surgical

      对这种体系结构有何想法?为什么我应该/不应该使用它?我特别在寻找成功/恐怖故事.



      长版



      The long version

      注意:

      • 用户的计算机知识不是很高. 例如,即使在表面上 完全解释Gears的工作原理 没问题.
      • 即使数据确实是用户的过错(除非他删除了计算机上的随机目录),我也会对数据丢失负责.
      • 我可以要求用户在其计算机上安装某些东西.它不一定要100%基于网络和/或在沙盒中运行
      • Users are not very computer-literate. For instance, even superficially explaining how Gears works is totally out of the question.
      • I WILL be held liable if data is loss, even if it’s really the users fault (short of him deleting random directories on his machine)
      • I can require users to install something on their machine. It doesn’t have to be 100% web-based and/or run in a sandbox

      解决该问题的常用方法在某种程度上感觉不足.这是每个的简短分析. Gears/HTML5:

      The common solutions to this problem don’t feel adequate somehow. Here is a short analysis of each. Gears/HTML5:

      • 无法控制数据,可以删除 由用户发出,没有任何警告
      • 否 控制数据的位置(不是 跨浏览器统一 平台)
      • 用户需要在浏览器中打开
      • 应用程序以进行同步;没有自动的幕后同步
      • 不同的浏览器被不同地对待,在一台机器上没有统一的数据视图
      • 可用磁盘空间有限
      • 同步是完全手动的,基于sql的存储使这很麻烦(如果sql表已完全复制,则不会那么复杂,但对于我来说不是这样).这是一个非常复杂的问题.
      • 我的代码几乎是完全开源的(html/js)
      • no control over data, can be deleted by users without any warning
      • no control over location of data (not uniform across browsers and platforms)
      • users need to open application in browser for synchronization to happen; no automatic, behind-the-scene synchronization
      • different browsers are treated differently, no uniform view of data on a single machine
      • limited disk space available
      • synchronization is completely manual, sql-based storage makes this a pain (would be less complicated if sql tables were completely replicated but it’s not so in my case). This is a very complex problem.
      • my code would be almost completely open sourced (html/js)

      Adob​​e AIR:

      Adobe AIR:

      • 其中一些
      • 服务器端不包含(!)
      • 可以在后台运行,但不能无窗口
      • 手动同步
      • 网络缓存似乎很复杂
      • 以某种方式感觉像是垃圾,我在某些计算机上安装时遇到了问题

      我的要求是:

      • 基于Web(必须).对于一些 原因,用户之间共享数据 例如.
      • 离线(必须).该应用程序必须完全可以脱机使用(带有一些罕见的例外).
      • 快速开发(必须).我是一个开发人员,与拥有更多业务资源的玩家抗衡.
      • 封闭源(不错).是的,我了解开源模型.但是,在这一点上,我不希望竞争对手模仿我.同样,他们拥有更多资源,因此他们可以承担我的辛勤劳动,并在比我本人更短的时间内使其变得更好.显然,他们仍然可以复制我来开发自己的代码-很好.
      • Web-based (must). For a number of reasons, sharing data between users for instance.
      • Offline (must). The application must be fully usable offline (w/ some rare exceptions).
      • Quick development (must). I’m a single developer going against players with far more business resources.
      • Closed source (nice to have). Yes, I understand the open source model. However, at this point I don’t want competitors to copy me too easily. Again, they have more resources so they could take my hard work and make it better in less time than I could myself. Obviously, they can still copy me developing their own code -- that is fine.

      推荐答案

      CRM产品的恐怖故事:

      Horror stories from a CRM product:

      • 如果您的应用程序使用率很高,那么将其数据的完整副本存储在用户的计算机上是不可行的.
      • 如果您的应用程序具有可由许多用户更新的数据,则复制并不简单.如果三个具有本地更改的用户同步,谁会赢?
      • 实际上,这并不是用户真正想要的.他们希望从任何地方实时访问最新数据.我们最好能为单一的事实来源提供移动界面.

      这篇关于离线网络应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆