You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Eric B <eb...@gmail.com> on 2014/09/10 05:45:18 UTC

Spring data for CouchDB?

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

Re: Spring data for CouchDB?

Posted by Nestor Urquiza <ne...@gmail.com>.
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 <la...@gmail.com>
wrote:

> 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>]
>
> Andy Wenk wrote:
>
>> 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 dev@couchdb.apache.org :).
>>
>> Cheers
>>
>> Andy
>>
>>
>>     On 10 September 2014 05:45, Eric B <eb...@gmail.com> wrote:
>>
>>     > 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
>>     Hamburg - Germany
>>     RockIt!
>>
>>     GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>>
>>     https://people.apache.org/keys/committer/andywenk.asc
>>
>
>

Re: Spring data for CouchDB?

Posted by Landry Soules <la...@gmail.com>.
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>]
Andy Wenk wrote:
> 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 dev@couchdb.apache.org :).
>
> Cheers
>
> Andy
>
>
>     On 10 September 2014 05:45, Eric B <eb...@gmail.com> wrote:
>
>     > 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
>     Hamburg - Germany
>     RockIt!
>
>     GPG fingerprint: C044 8322 9E12 1483 4FEC 9452 B65D 6BE3 9ED3 9588
>
>     https://people.apache.org/keys/committer/andywenk.asc


Re: Spring data for CouchDB?

Posted by Andy Wenk <an...@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 dev@couchdb.apache.org :).

Cheers

Andy


On 10 September 2014 05:45, Eric B <eb...@gmail.com> wrote:

> 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
Hamburg - Germany
RockIt!

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

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