HTML5的Web SQL数据库的关注 [英] HTML5 Web SQL Database Concerns

查看:233
本文介绍了HTML5的Web SQL数据库的关注的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我公司目前转换到一个新的体系结构,以及该移动设备提供服务的模型。我们的应用是传统的基于网页( HTML5 / CSS3 / JS / PHP / MySQL的),所以我们希望能够将它移植到移动平台,而不必另起炉灶(科尔多瓦),以及在一个独立的时尚桌面( AppJS ),这样我们就不必担心浏览器相关的错误。我们也从 PHP 过渡客场的的NodeJS ,以使这更可行。

My company is currently transitioning to a new architecture, as well as a model that provides services to mobile devices. Our application was traditionally web based (HTML5/CSS3/JS/PHP/MYSQL), so we want to be able to port it to mobile platforms without having to reinvent the wheel (Cordova), as well as to desktops in a standalone fashion (AppJS) so that we don't have to worry about browser-dependent bugs. We are also transitioning away from PHP to NodeJS to make this more feasible.

的问题是,我们的用户同步,它给我们的服务器之前,需要在能维持多久,有多少数据存储我们的应用程序脱机使用,没有真正限制的能力。

使用AppJS,这不是一个问题,因为需要一个源码数据库内它们可以存储尽可能多的数据。然而,我发现一个关于 5MB配额作为的WebSQL数据和科尔多瓦/ PhoneGap的问题。这presents对我们的业务需求明显的技术挑战。

With AppJS, this isn't an issue because they can store as much data as needed within a sqlite database. However, I have discovered the issue regarding a 5MB quota for WebSQL data and cordova/phonegap. This presents obvious technical challenges regarding our business needs.

据我所知,有一对夫妇的插件,使您能够使用SQLite的数据。原来的sqlite的插件(https://github.com/davibe/Phonegap-SQLitePlugin)缺少文档Android和其他(https://github.com/chbrody/Cordova-SQLitePlugin)要求我指定数据的限制这显然是不可能的。因此,我留下非常少的选项,其中之一是将数据库分成其通过一个JS包装控制的多个5MB段。

I am aware that there are a couple of plugins that enable you to use sqlite data. The original sqlite plugin (https://github.com/davibe/Phonegap-SQLitePlugin) lacks documentation for android, and the other (https://github.com/chbrody/Cordova-SQLitePlugin) requires me to specify a data limit which obviously isn't possible. I am therefore left with very few options, one being to split the databases into multiple 5MB segments which are controlled by a JS wrapper.

您能否可行性的横跨iOS和Android没有问题拆分较大的数据结构分为多个5MB的WebSQL数据库?

Can you feasibly split larger datastructures into multiple 5MB websql databases with no issues across iOS and Android?

有一个上限的WebSQL数据库对iOS和Android的总数?

Is there a limit on the total number of websql databases on iOS and android?

有没有,你会建议我们看看其他的选择吗?我们需要能够使用我们现有的HTML5和CSS的前端!

Are there any other options that you would recommend we look at? We need to be able to use our existing HTML5 and CSS for the frontend!

修改

我们原来的架构从未真正与平板设备的工作。这是我们正在寻找与科尔多瓦补救,以及建设一个更加稳​​定的解决方案。原来,我们的离线运行的产品上有各种各样的,因为客户机

推荐答案

有关Android平台,你可以创建一个本机应用程序,然后使用一个web视图来显示前端(如果它真的很重要,以保持它的HTML) ,然后使用JavaScript桥,允许在web视图内容与你的本机应用程序进行交互。

For the android platform, you could create a native app, and then use a webview to display the front end (if its really that important to keep it HTML), then use a javascript bridge to allow the content in the WebView to interact with your native app.

从你描述的,虽然对应用程序是什么,我想你最好实际创建的本地应用程序。当您在您的评论说,你正在交换平台的原因之一,就是因为缺乏控制。为什么然后立即通过引入各种混合应用框架到你的筹码重新打开这罐蠕虫。

From what you have described about the application though, I think you are better off actually creating a native application. As you say in your comment, one of the reasons you are switching your platform is because of lack of control. Why then immediately re-open this can of worms by introducing all sorts of hybrid app framework into your stack.

长话短说,你将有完全控制(并且很可能,更好的产品),如果你只是与本地方法去。

Long story short, you will have full control (and quite likely, better product) if you just go with the native approach.

这篇关于HTML5的Web SQL数据库的关注的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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