othman
othman

Reputation: 4556

GWT (or javascript) library for couchDB

I'm looking for a good design (best practices) to integrate a couchDB layer with my GWT app.

I did some research and found the gwt-couchdb project which seems to propose a method to integrate GWT and couchDB in a more clean way. But i'm not sure how this tool works and if its proposed solution is worth using it?

in fact we need a pure client side gwt library for gwt. a library that doesn't need a java backend server to run like Ektorp . i found i found BrowserChouch which seems to be a javascript lib for couchdb..yet i'm not clear if this is a reliable library and how to use it in gwt.

do you know of such libraries for chouchdb to be used with js or gwt on client side?

Upvotes: 1

Views: 524

Answers (1)

gabrtv
gabrtv

Reputation: 3588

If you're familiar with RDBMS'es, switching to a document databases can be jarring. Before diving into CouchDB, make sure you read CouchDB Definitive Guide cover-to-cover.

Because CouchDB is accessed via simple HTTP requests, the database driver you choose is not very important. gwt-couchdb looks perfectly fine -- however, you could probably write your own driver in a few hours after reading the Document API.

Your biggest design concerns will be:

  1. Modeling your data as loosely coupled "documents" suitable for a document store
  2. Outlining exactly how you will query those documents, so you can build your CouchDB views

Remember that your data model should dictate your choice of database, not the other way around. Document stores like CouchDB and MongoDB are often a great choice, but if referential integrity is a hard requirement you may need to look elsewhere (e.g. PostgreSQL).

Upvotes: 1

Related Questions