Couchbase Lite using phonegap plugin

Hello Experts, I’m new to CBLite and Cordova/Phone development. I’m able to get the url of running instance of CBLite using javascript cordova app.

However can someone provide me “Hello world” example on how to create a new DB, do a put and get a document onto CBLite database using phonegap plugin.

BTW I have gone though the “todolite” sample app too, but it too convoluted and it blends server and client logic.

Coax is just doing REST / XHR requests. We are planning to rewrite this example using raw jQuery. For now the best thing to do is look at the usage here to better understand the calls it is making in todolite. You can make those calls with any Ajax library, if you like. Coax is just a tool for managing URL paths as JavaScript data structures and making XHR requests. So you can replace it with whatever you like.

Thanks for the suggestion.

In fact I had started trying it using direct REST calls, you have validated it.

So do you suggest direct REST call over coax or it does not matter, mainly from maintainability point of view.

I also would like to know if there are any drawbacks of using Phonegap plugin vis-a-vis Native API?

The main problem with the PhoneGap path is that it can be a pain to debug (although Safari dev tools help a lot).

I would only use coax if you enjoy it, otherwise use your own XHR wrapper.

@jchrisa is this below feasible in using COAX?
Attachments Store/Retrieve as URL
Setup: CBL+ Cordova + COAX