PhoneGap的 - sqlite的或索引数据库? [英] phonegap - sqlite or Indexed DB?

查看:110
本文介绍了PhoneGap的 - sqlite的或索引数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是网页开发人员开始使用PhoneGap的。我需要创建一个应用程序的iPhone,Android和Windows Phone 8
我需要在本地存储一些数据(过大的localStorage)。
我不知道女巫的解决方案是最好的:

I am web developer starting with phonegap. I need to create one app for iPhone, android and Windows Phone 8.
I need to store some data (too big for localStorage) locally.
I don't know witch solution is the best:

  1. 的PhoneGap提供存储(基于WebSQL - 这是德precated),但它不支持Windows Phone的。是否有任何插件,以填补这一空白?
  2. 在我读到索引数据库,但我还没有使用过它,它是不是很直观的给我。我不知道,如果它在所有平台上完全支持?我的基础上(<一href="http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html">http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html)
  3. 或者,也许我可以使用PhoneGap的插件<一href="https://github.com/marcucio/Cordova-WP-SqlitePlugin">https://github.com/marcucio/Cordova-WP-SqlitePlugin为Windows Phone和<一href="https://github.com/marcucio/Cordova-SQLitePlugin%20for%20android%20and%20iphone.">https://github.com/marcucio/Cordova-SQLitePlugin对于Android和iPhone。的。然后,当我想我的code将在所有平台上是相同的。
  1. Phonegap provides Storage (based on WebSQL - which is deprecated), but it is not supported by windows phone. Is there any plugin to fill this gap?
  2. I read about Indexed DB, but I haven't used it before and it is not very intuitive for me. I am not sure if it is fully supported in all platforms? I based on (http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html)
  3. Or maybe I can use phonegap plugins https://github.com/marcucio/Cordova-WP-SqlitePlugin for windows phone and https://github.com/marcucio/Cordova-SQLitePlugin for android and iphone.. Then my code would be the same in all platforms as I suppose.

在是否有人产生这样的应用程序?我将不胜感激任何解决方案或想法。

Did someone create such an app before? I would be greatful for any solutions or ideas.

推荐答案

科尔多瓦WP8支持索引型而已。 iOS和Android的唯一WebSql。由于WebSql是德precated(我知道有很多人都喜欢/使用它,并同意在很多情况下WebSql是非常酷)我会建议进行索引型数据库,并使用以下polyfill为Android / iOS的。

Cordova WP8 supports IndexedDB only. iOS and Android WebSql only. Since WebSql is deprecated (I know how many people love/use it and agree that in many situations WebSql is very cool) I would recommend to proceed with IndexedDb and use the following polyfill for Android/iOS.

的PhoneGap polyfill为索引型数据库,使索引型数据库的API与WebSQL

<一个href="http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html">Example

这篇关于PhoneGap的 - sqlite的或索引数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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