Thanks Can you please confirm if this is how it works: - JS Wrappers internally call Rest APIs which internally call Cardova Plugin which uses the CouchbaseLite and CouchbaseLiteListener frameworks to update data in SQLLite storage. Is this understanding correct ?
- So in a Cardova application for every REST API invoked an equivalent plugin code that gets called. If that is the case how do the app differentiate when it needs to use the REST API to call the server or it needs to divert the REST API calls to the Cardova Plugin . On Tuesday, May 19, 2015 at 9:36:52 PM UTC+5:30, Jens Alfke wrote: > > On May 19, 2015, at 8:55 AM, [email protected] <javascript:> wrote: > > New to CouchBase Lite. Have few very basic queries: > > - Is there a JS API to access CouchBase Lite DB via Phonegap plugin on iOS > ? The kind of JS APIs Pouch DB exposes ? > > > There is a REST API (compatible with CouchDB’s). JS applications generally > use wrapper functions that call that API. > > - > http://developer.couchbase.com/mobile/get-started/get-started-mobile/phonegap/index.html > This > link seems to talk about a phonegap plugin but when I see the plugin code > it does do much; > > > The functionality is in the CouchbaseLite and CouchbaseLiteListener > frameworks. > > how then the ToDo application uses the get and put function which get > internally map to iOS native CouchBase Lite API functions? > > > By calling the REST API > <http://developer.couchbase.com/mobile/develop/references/couchbase-lite/rest-api/index.html>. > > If you look for the definitions of the get and put JS functions in the > ToDoLite source, you’ll see that they use XMLHTTPRequest. > > - What is the underlying storage mechanism ? By looking at the API it > looks like it uses CoreData internally ? > > > No, it uses SQLite directly for storage. In version 1.1 there is an option > to use ForestDB, a new key-value store developed at Couchbase which is > significantly faster. > > —Jens > -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/46525e8b-58e9-4fca-990d-489d101e29ab%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
