Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which PHP library I should choose to work with CouchDB?

Tags:

I want to try playing with CouchDB for a new project I'm writing (as a hobby, not part of my job). I'm well versed in PHP, but I haven't programmed with CouchDB at all, and also I have little experience with non-SQL databases.

From looking at CouchDB's "Getting Started with PHP" document they recommend using a third-party library or writing your own client using their RESTful HTTP API. I think I'd rather not mess with writing protocol implementations myself at this point, but what is your experience with writing PHP to work with CouchDB?

I haven't tested any of the alternatives yet, but I looked at:

  • PHPillow : I'm interested in the way they implement ORM. I wasn't planning to do ORM, but my problem domain probably map well to that method.
  • PHP Object Freezer: seems like a poor man's ORM - I can use it to implement an actual ORM, or just as an easy store/retrieve document API but it seems too primitive.
  • PHP-on-Couch : Also a bit simple, but they have an interesting API for views and from the documentation it looks usable enough.
  • PHP CouchDB Extension : From the listed options this looks like it has the best chance of making it into the PHP mainline itself, and also has the most complete API.

Any opinion one wish to share on each library is welcome.

like image 290
Guss Avatar asked Apr 04 '10 02:04

Guss


1 Answers

For what it's worth, I had many of the same problems. I ended up using the "advanced" example on the CouchDB wiki for a lot of my first projects, as I found it was better than a lot of the libraries you listed and felt more natural, but got tired of some bugs and lack of features.

So I wrote my own: Sag. Version 0.1.0 is going to be released this week, but the latest code in the repository is stable - I'm using it on a few projects right now. Not that I'm biased or anything. :-)

Cheers.

like image 118
Sam Bisbee Avatar answered Oct 11 '22 06:10

Sam Bisbee