PhoneGap的 - sqlite的或索引数据库?索引、数据库、PhoneGap、sqlite

2023-09-05 07:46:04 作者:最初的简简单单′′

我是网页开发人员开始使用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:

的PhoneGap提供存储(基于WebSQL - 这是德precated),但它不支持Windows Phone的。是否有任何插件,以填补这一空白? 在我读到索引数据库,但我还没有使用过它,它是不是很直观的给我。我不知道,如果它在所有平台上完全支持?我的基础上(http://blog.nparashuram.com/2012/10/indexeddb-example-on-cordova-phonegap_12.html) 或者,也许我可以使用PhoneGap的插件https://github.com/marcucio/Cordova-WP-SqlitePlugin为Windows Phone和https://github.com/marcucio/Cordova-SQLitePlugin对于Android和iPhone。的。然后,当我想我的code将在所有平台上是相同的。 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? 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) 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

Example