remoteStorage

Cordova Plugin


#1

Is there a remote storage plugin for Cordova/phonegap frameworks?

Guide for developing plugins:
http://docs.phonegap.com/en/2.7.0/guide_plugin-development_index.md.html


#2

Why wouldn’t you just run remoteStorage.js as part of the web app?


#3

I already do that. Let’s make it even simpler to add remote storage feature using the plugin architecture by running …

$ cordova plugin add https://path-to-.git

Reference:
https://hacks.mozilla.org/2014/02/building- ordova-apps-for-firefox-os/


#4

What exactly would you expect from the plugin to give you?


#5

The use case here is quickly add remote storage features to your web apps. :slight_smile:


#6

Yes, but as @xMartin said, you can just use the JavaScript library for that. What exactly do you want a potential plugin to provide?

(Usually Cordova plugins are used to provide more native features to apps.)


#7

True. However this thread is about workflow improvements.

As a developer evangelist I give a lot of demos and simple workflows are important. Imagine just typing a command to add remote storage with one command and getting on with my code to store data remotely is good workflow improvement.


#8

Yes, that command should be bower install remotestorage, though. :wink:

Cordova plugins are not made for managing JavaScript/CSS/etc. packages, but for native bridge plugins as far as I know. You wouldn’t install Bootstrap or Mozilla’s Brick library as a Cordova plugin either, right?


#9

Ah! My bad. Thank you for clearing that up.


#10

No worries. It’s definitely not being advertised properly at the moment! We’ll change that on the new website, which is in the works.


#11

i disagree. i think in the long run, remoteStorage should totally become a Cordova plugin. just that at the moment, we are not ready for that yet.

a year ago I met Brian Leroux from phonegap at a conference, and we agreed that it would be cool if Cordova could provide a file storage abstraction which abstracts from iCloud on iOS and basically polyfills remoteStorage on other platforms - or at least offer something of the kind as an option to developers who target multiple platforms and who want to store some data on per-user cloud storage (which i guess are most Cordova users).

we are already working on making remotestorage.js a more generic per-user storage layer by adding GoogleDrive and Dropbox as backends. the idea is to position ourselves as ‘sync for the web’, so much more ambitious scope than what our library is now.

i also think we should get a deeper integration with Firefox OS. i mentioned this to Dietrich Ayala a few months ago; he pointed me to the data api, and we talked a bit about that:


having said that, it is true that at this point remotestorage.js is purely a javascript library and not a shim.

the Cordova plugin instructions you linked to state:

Once you have defined a JavaScript for your plugin, you need to complement it with at least one native implementation.

so this would only make sense if once implement a bridge to iCloud on iOS, for instance. so at the moment, @xMartin and @raucao are correct, but i think in the future we definitely want to integrate deeper into the html platform by linking closer to both Cordova and Firefox OS.

@arky are you a developer advocate for Mozilla? just subscribed to your blog http://playingwithsid.blogspot.in/p/about.html - cool, welcome to our forum! :slight_smile:


#12

You don’t. What you’re talking about is exactly my vision of a potential plugin, and it has nothing to do with just dropping in the JS lib.

By the way, @arky was part of AfricaHackTrip and started building the Mozilla communities in Rwanda and Tanzania at our events there. :wink: