I am trying to create a hybrid desktop application for MAC, Linux and Windows platforms with Electron. I need my app to be work in offline mode as well. So, I was planning to do it with couchbase lite. But it seems like Couchbase Lite plugin is available only for MAC OSX. With the use of that I created my application for MAC OSX. Now my question is what is the proper way to do it in Windows and Linux ?
Why the Couchbase team doesn’t developed any Couchbase Lite plugin for Windows and Linux what was the difficulty in that ? Are there any alternative solutions to use Couchbase Lite plugin for this. And for few reasons I don’t want to use PouchDB I want to develop the app only with Couchbase Lite.
Windows and Linux are covered by both the .NET and Java versions of Couchbase Lite. I guess you want to know why we don’t have a pure C or C++ version? The best answer I have is because it’s too much work given the manpower that we have.
Couchbase Lite Core isn’t meant to be used by itself. Its internal API is pretty rough, and likely to change without notice, and Couchbase doesn’t provide any support for it. (But of course it’s open source, so feel free to try it out if you dare.)
Hi,
We’ve developed an windows desktop hybrid application using electronjs which has few forms, data will be stored to enterprise couchbase server. I was checking if you’ve couchbase lite for nodejs/electron but it seems you’ve couchbase lite only for .net, swift or java. I found another post that suggest to use pouchdb but I assume puchdb might have security issue as it doesnt encrypt the data locally like couchbase lite does. Could you suggest any solution so that we still can use couchbase lite along with couchbase sync gateway?
The only way would be to either write Javascript bindings for LiteCore to mimic the Couchbase Lite API or to write a bridge between Javascript and Couchbase Lite.
We don’t support using Couchbase Lite Core directly. The REST API is incomplete and mostly untested; don’t use it for this. The C API is of course complete but since it’s internal it’s subject to change without notice.
@jens I’m willing to dare msyelf using the C API to create a Qt wrapper around it. I fully understand that the API is subject to changes, but if I stick to a certain version, let’s say 2.0, will I have problems until a new version comes out? Also, is there any sample code on how to use the C API? Being new to couch itself, that’s currently my biggest problem to start this adventure. Thx! Best regards.
If you stick to one version, the API won’t change out from under you And the core parts (CRUD) of the LiteCore API don’t tend to change much.
Most of the docs are in Doxygen comments in the headers (c4Base.h, c4Database.h, etc.) The LiteCore wiki has some other docs on thread safety, the query syntax, etc. You’ll also need to look at the header docs in the Fleece submodule (FLSlice,h, Fleece,h) to understand how to access and create document properties.
For sample code, you can look at the “cblite” command line tool, which is at https://github.com/couchbaselabs/cblite [IIRC; typing from memory]. It has sub commands to do a lot of common db operations.