You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by BABALWA MAGALELA <20...@cput.ac.za> on 2010/11/18 13:45:51 UTC

Reading from couchDB into table

Hello All

I am using Vaadin to biuld a medical system. Im new to it, and Im having
trouble getting the correct code that gets my app to read from the
couchDB into the table Ive created in Vaadin. Any pieces of code or
examples you could offer me?
--------------------------------------------------------------------
Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Peninsula University of 
Technology or the sender of this e-mail be liable to any party for
any direct, indirect, special or other consequential damages for any
use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.cput.ac.za/email.php or call +27 (0)21 460 3911

Re: Reading from couchDB into table

Posted by Henrik Lundgren <ca...@gmail.com>.
If we are going to plug Java connectors for CouchDB I might aswell
mention Ektorp.

In contrast to its peers, It has good refence documentation:
http://www.ektorp.org/reference_documentation.html

It is quite flexible in terms of mappable types, you can use plain
Objects, Maps or JsonNodes (DOM like API)

Here's the project site:
http://code.google.com/p/ektorp/

Regards
Henrik Lundgren (creator of Ektorp)

On Thu, Nov 18, 2010 at 4:43 PM, Aurélien Bénel <au...@utt.fr> wrote:
> Hi,
>
>> I recommend using a CouchDB library for Java.
>
> By the way, we have created yet another java client library.
>
> We use it for information visualisation (which means displaying a lot of data at the same time). Therefore, the emphasis is put on improving read performance (cached bulk GET). On _changes, the cache is cleared and the observers are notified.
>
> It's called RESTDatabase:
>   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=blob_plain;f=src/org/hypertopic/RESTDatabase.java;h=b7d67a3146475d9057dd8fec40967dd10514146d;hb=HEAD
>
> And it is tested here:
>   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=blob_plain;f=src/org/hypertopic/RESTDatabaseTest.java;h=6b5dfcb2d1022fe586b2c22b77ee517aa4a20b54;hb=HEAD
>
> We minimized the dependencies to a single modified org.json library:
>   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=tree;f=src/org/json;h=311adf0af9d49f0dfc1d9fbafeb113bb23eb29fe;hb=HEAD
>
>
> Regards,
>
> Aurélien (for the Hypertopic team)

Re: Reading from couchDB into table

Posted by Aurélien Bénel <au...@utt.fr>.
Hi,

> I recommend using a CouchDB library for Java. 

By the way, we have created yet another java client library. 

We use it for information visualisation (which means displaying a lot of data at the same time). Therefore, the emphasis is put on improving read performance (cached bulk GET). On _changes, the cache is cleared and the observers are notified.

It's called RESTDatabase:
   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=blob_plain;f=src/org/hypertopic/RESTDatabase.java;h=b7d67a3146475d9057dd8fec40967dd10514146d;hb=HEAD

And it is tested here:
   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=blob_plain;f=src/org/hypertopic/RESTDatabaseTest.java;h=6b5dfcb2d1022fe586b2c22b77ee517aa4a20b54;hb=HEAD

We minimized the dependencies to a single modified org.json library:
   http://porphyry.git.sourceforge.net/git/gitweb.cgi?p=porphyry/porphyry;a=tree;f=src/org/json;h=311adf0af9d49f0dfc1d9fbafeb113bb23eb29fe;hb=HEAD


Regards,

Aurélien (for the Hypertopic team)

Re: Reading from couchDB into table

Posted by Nils Breunese <N....@vpro.nl>.
BABALWA MAGALELA wrote:

> I am using Vaadin to biuld a medical system. Im new to it, and Im having
> trouble getting the correct code that gets my app to read from the
> couchDB into the table Ive created in Vaadin. Any pieces of code or
> examples you could offer me?

I recommend using a CouchDB library for Java. I use jcouchdb [0] myself and you should be able to use that to query a view and iterate over the ViewResult to add items to a Vaadin Table.

Nils.

[0] http://code.google.com/p/jcouchdb/
------------------------------------------------------------------------
 VPRO
 phone:  +31(0)356712911
 e-mail: info@vpro.nl
 web:    www.vpro.nl
------------------------------------------------------------------------