[aerogear-dev] Cordova Plugin Idea
Matthias Wessendorf
matzew at apache.org
Thu Dec 20 13:14:31 EST 2012
(back at a normal computer, was mobile before)
On Thu, Dec 20, 2012 at 5:34 PM, Lucas Holmquist <lholmqui at redhat.com> wrote:
> I know we really haven't talked about cordova plugins to much, but i want to
> just get this thought down so i didn't forget about it.
>
> would it make sense to have a cordova plugin for accessing the core data
> stuff from our iOS libs, that is once it's ready.
Yes, makes sense (current thinking ;-)) and I had the same thought,
but forgot about it.
>
> I know cordova has a storage api, but it looks like it is just based on the
> W3C web storage/web sql specs
>
> i guess i was thinking this is how it would work:
>
> Possibley have an aerogear.js datamanager plugin for the front end that then
> calls the aerogear ios libs coredata plugin
>
> In JS
>
> var dataManager = AeroGear.DataManager({
> name: coreDataStore,
> type: CoreData //or something
> });
>
> var coreDataStore = dataManager.stores[0];
>
> coreDataStore.read() // this would access the Aerogear ios core data part
These are the default storage types of CoreData:
- NSSQLiteStoreType
- NSBinaryStoreType
- NSInMemoryStoreType
We could have a "Cordova-iOS" plugin that stores the Data into an
NSPersistentStore.
This makes sense (current thought) where an application is _really_
hybrid (meaning ObjC code + some HTML/JS bits are doing the work).
The benefit would be both worlds "native ObjC" and "web-ish JS" have
ONE store. The ObjC code runs directly against a CoreData store, the
JS bits would communicate to the same, via a Cordova (iOS) plugin.
Would be good to track this for after 1.0.
-Matthias
>
> I'm not really familiar with core data, so i could be way off base with this
> idea
>
>
>
> -Luke
>
> _______________________________________________
> aerogear-dev mailing list
> aerogear-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/aerogear-dev
>
--
Matthias Wessendorf
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf
More information about the aerogear-dev
mailing list