对iPad中Web应用程序的脱机支持 [英] Offline support for web application in ipad

查看:115
本文介绍了对iPad中Web应用程序的脱机支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为餐厅开发了Web应用程序.它的前端办公室是为iPad开发的,后端办公室则维护.net Web应用程序. SQL Server 2008用作数据库.

我想制作用于Front office的脱机应用程序,当无法使用iPad连接网络/DB Server时可以使用该应用程序.
在应用程序中,我拥有菜单主菜单,项目主菜单,子菜单主菜单等母版,以及交易
页面,如插入/更新项目,子项目,订单,发票等.

无法修改主表的数据,但是应该在其他页面中有主表的最新数据要进行交易.

在脱机模式下,使用ipad的Fron office应该在事务模块上工作.
并且每当系统连接到Internet时,所有脱机交易更改都应与在线数据同步

如果可以建议我不在客户端安装sql的解决方案,那就更好了.我曾考虑过按照表结构使用保存数据xml/json文件,但是对于大量的表和客户端来说,它不是最好的选择,并且存在安全问题

请指导我.任何帮助将不胜感激

在此先感谢

I have developed web application for restaurant. Its Front office is developed for iPad and back office maintain .net web application . SQL Server 2008 is used as database.

I want to make offline application for Front office which can be used when unable to connect network / DB Server using iPad.
In app i have Masters like Menu master,item master,submenu master etc. and transaction
pages like insert/update item,subitem,order,invoice etc.

Master table''s data cannot be Modified but, there should be latest data of master table to transaction in other pages.

In offline mode Fron office using ipad should be working on transaction modules.
and whenever system is connected to internet all offline transaction changes should synchronize with online data

It will be better if can suggest me solution without installing sql at client I have think to use save data xml/json files as per table structure but its not preferable with large numbers of tables and clients and also security issue is there

Please guide me on this. Any help would be appreciated

Thanks in advance

推荐答案



假设Front Office还是为iPad设计的Web应用程序,您需要查看Safari中iOS所支持的HTML5功能,即Cache Manifest和WebSQL.

缓存清单将指示iPad下载以脱机方式运行所需的所有网站组件.首次完成加载后,您可以将设备设置为飞行模式,并且该网站仍然可以正常运行.

您可以将WebSQL用作本地存储.这是SQL Lite在浏览器中的实现,可用于在客户端中存储信息以供日后调用.

Web SQL
HTML5-Web SQL数据库 [使用应用程序缓存的入门指南 [
Hi,

Working on the assumption the Front Office is also a web application designed for the iPad you need to look at a HTML5 features supported by Safari within iOS called Cache Manifest and WebSQL.

Cache manifest will instruct the iPad to download all the website components required to operate in an offline capacity. Once it''s finished loading for the first time you can put the device in aeroplane mode and the website will still works.

You can the use WebSQL as local storage. This is an in browser implementation of SQL Lite which can be used to store information within the client for recall at a later date.

Web SQL
HTML5 - Web SQL Database[^]

Cache Manifest
A beginner''s guide to using the application cache[^]

Other points to consider are that the approach needed for a cache manifest application to that of a tradition web application are very different. With an offline web application you can''t rely on the ASP.Net framework for doing most of the work. Data driven content creation must be done using JavaScript. With server side communication done via AJAX. Alot of the Chrome apps work in this way. The applications are written in HTML and JavaScript. The content is downloaded and cached when it is first loaded. It is then available offline. WebSQL is used for local storage, AJAX is used for server communications with error handling to manage when offline.


这篇关于对iPad中Web应用程序的脱机支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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