incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Van Couvering <david.vancouver...@gmail.com>
Subject Re: Which Java library to choose?
Date Thu, 22 Apr 2010 19:38:11 GMT
Definitely like jcouchdb.

On Thu, Apr 22, 2010 at 12:00 PM, Jarrod Roberson <jarrod@vertigrated.com>wrote:

> jcouchdb works fine with 0.11
>
> Jarrod Roberson
> 678-551-2852
>
> On Apr 22, 2010, at 2:46 PM, Nils Breunese <N.Breunese@vpro.nl> wrote:
>
> > I have never used a dedicated Java library to access CouchDB since
> > it's all simply REST, but there's two that I know of: couch4j [0]
> > and jcouchdb [1]. Neither look like they've been updated for CouchDB
> > 0.11 yet.
> >
> > I actually wrote some code today to access CouchDB from a Java CMS
> > backend, parse the JSON result into a Map using Jackson's simple
> > data binding [2] and provide that structure to a template for
> > rendering. That's sounds like a lot of work in Java, but it was
> > actually pretty easy and I didn't feel I needed a full on CouchDB
> > library. The gist of it was:
> >
> > ----
> > ObjectMapper mapper = new ObjectMapper();
> > URL url = new URL("http://couchdb.example.com:5984/db/doc");
> > Map<String, Object> doc = mapper.readValue(url.openStream(),
> > Map.class);
> > ----
> >
> > But yeah, sure, I understand if you need some more abstraction
> > (although Jackson's full data binding might also help here). There's
> > tons of JSON libraries for Java (json-lib, Jettison, Svenson,
> > Jackson, Gson, etc.) and I officially like Jackson best since today.
> > For a little higher level abstraction I'd try something like
> > Spring's RestTemplate or other REST-oriented tools. Or yeah, try a
> > dedicated CouchDB library.
> >
> > Happy hacking!
> >
> > Nils Breunese.
> >
> > [0] http://couch4j.org/
> > [1] http://code.google.com/p/jcouchdb/
> > [2] http://wiki.fasterxml.com/JacksonInFiveMinutes
> > ________________________________________
> > Van: Meenakshi Sundaram RM [sundar@devsundar.com]
> > Verzonden: donderdag 22 april 2010 19:21
> > Aan: user@couchdb.apache.org
> > Onderwerp: Which Java library to choose?
> >
> > Hello,
> >
> > I came across many Java libraries for accessing CouchDB from a java
> > application. But I am confused which one to choose. Is there any
> > community recommend one?
> >
> > I want to use a library which has the following:
> > * Actively developed
> > * Stable
> > * Easy to use
> > * Allows most of the functionality supported by CouchDB
> >
> > Any suggestions/pointers is highly appreciated.
> >
> > Thanks in advance.
> >
> > - Sundar
> >
> > De informatie vervat in deze  e-mail en meegezonden bijlagen is
> > uitsluitend bedoeld voor gebruik door de geadresseerde en kan
> > vertrouwelijke informatie bevatten. Openbaarmaking,
> > vermenigvuldiging, verspreiding en/of verstrekking van deze
> > informatie aan derden is voorbehouden aan geadresseerde. De VPRO
> > staat niet in voor de juiste en volledige overbrenging van de inhoud
> > van een verzonden e-mail, noch voor tijdige ontvangst daarvan.
>



-- 
David W. Van Couvering

http://www.linkedin.com/in/davidvc
http://davidvancouvering.blogspot.com
http://twitter.com/dcouvering

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message