Spring data for CouchDB?

660 views
Skip to first unread message

Eric B

unread,
Sep 9, 2014, 11:45:47 PM9/9/14
to us...@couchdb.apache.org
I come from a java/JPA background and am quite familiar with RDBMS. In the
past I've always used JPA with spring-data-JPA to act as a middle layer,
providing my repository pattern, etc. Am I able to use spring data with
CouchDB? I see there is a spring-data-couchbase, but I do not know if it
is compatible with CouchDB.

If not, what does everybody use to provide DAO/repository pattern? Custom
code?

Thanks,

Eric

Andy Wenk

unread,
Sep 10, 2014, 3:05:42 AM9/10/14
to us...@couchdb.apache.org
Hi Eric,

welcome to Apache CouchDB :).

I would like to give you a short info because I read "spring-data-couchbase"
in your email. Couchbase is different form Apache CouchDB. Here you are
writing to the Apache CouchDB Open Source Project :). If you are using
Couchbase, please refer to the appropriate resource (
http://www.couchbase.com/).

Regarding your question: Apache CouchDB itself does not provide any clients
or wrappers but there is a huge bunch of clients and wrappers available. A
good entry point is http://wiki.apache.org/couchdb/Related_Projects. On the
other hand, CouchDB offers a very simple HTTP API - so basically you just
need HTTP to communicate with CouchDB.

And finally, if you write something by yourself, you are welcome to share
it here or at d...@couchdb.apache.org :).

Cheers

Andy
--
Andy Wenk
Hamburg - Germany
RockIt!

GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588

https://people.apache.org/keys/committer/andywenk.asc

Landry Soules

unread,
Sep 10, 2014, 4:05:57 AM9/10/14
to us...@couchdb.apache.org
Hello Eric,

As Andy wrote, CouchBD HTTP API is really simple to interact with. Basically
with Spring you will only need RestTemplate to communicate and Jackson to
translate your objects in JSON. Here is a code sample showing how to save a
new object: ​http://pastebin.com/s3au8Vgp

Sent with [inky: <http://inky.com?kme=signature>]

Nestor Urquiza

unread,
Sep 10, 2014, 7:32:56 AM9/10/14
to us...@couchdb.apache.org
We have used ektorp now for a while with good results
http://thinkinginsoftware.blogspot.com/2011/10/document-management-system-with-couchdb_5322.html

Cheers,
- Nestor


On Wed, Sep 10, 2014 at 4:05 AM, Landry Soules <landry.s...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages