 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Thomas Hunter: CouchDB and PHP Web Development (Book Review)
by Chris Cornutt September 26, 2012 @ 10:20:18
Thomas Hunter has posted a (nice long) book review of the Packt Publishing book "CouchDB and PHP Web Development" to his site.
When I first picked up this book, I was expecting a boring, text-book approach to code examples for PHP talking with CouchDB. Boy was I wrong. What I found was a book that has you build a complete working application. And by complete, I mean you'll add the Twitter Bootstrap framework and it will be sexy.
He mentions parts of the app you'll create - a PHP framework, 3rd party libraries, working with git/github - and goes through the sections of the book, talking about good and bad points along the way. Chapters cover things like: an introduction to NoSQL, REST/HTTP verbs, installation/config of CouchDB, using version control and deploying the app using the PHPFog PaaS hosting.
voice your opinion now!
couchdb development bookreview packt introduction
Gonzalo Ayuso: Book review CouchDB and PHP Web Development
by Chris Cornutt August 08, 2012 @ 08:16:48
Gonzalo Ayuso has posted a book review of a Packt Publishing book "CouchDB and PHP Web Development":
Finally the new Book "CouchDB and PHP Web Development" written by Tim Juravich is ready an in my hands. It was my first experience as technical reviewer. The author contacted me by email and the editor sent me book chapters to review. Basically I gave my opinion, I test the code and I hunt for bugs. It was a great experience. Now is really cool to see the book in my hands.
Overall, he gives it a positive review (for a beginner level book) and points out a few things that can help make the reading experience better, like the "Time for Action" sections. He also was happy with the author's choice of using the Twitter Bootstrap for the interface of the sample application.
voice your opinion now!
bookreview couchdb packt development
DZone.com: The era of Object-Document Mapping
by Chris Cornutt July 08, 2011 @ 11:45:46
On the PHP on Windows section of DZone.com today Giorgio Sironi has posted about a different sort of object mapping than is usually thought of with databases - object-document mapping.
The Data Mapper pattern is a mechanism for persistence where the application model and the data source have no dependencies between each other. [...] But everytime we talk about the Data Mapper pattern, we assume there is a relational database on the other side of the persistence boundary. We always save objects; we always map them to MySQL or Postgres tables; but it's not mandatory.
He talks about two projects, MongoDb_ODM and CouchDb_ODM, that the Doctrine project is working on to help make working with document-driven databases as simple as the usual ORMs. He includes a brief code snippet showing how the feature will work (hint: a namespace of Document instead of Entity). He lists some of the features - including the usual ORM capabilities, support for collections, cascade of persistence - and where you can get the latest code for it (from github and PEAR
voice your opinion now!
object document mapping doctrine mongodb couchdb
DZone.com: Using a stream wrapper to access CouchDb attachments with PHP
by Chris Cornutt April 28, 2011 @ 10:45:27
On DZone.com today there's a new post from Gonzalo Ayuso about using a stream wrapper to access CouchDb database directly from PHP (via a call to its local file).
Thanks to a comment in my last post (many thanks Benjamin) I've discovered that it's possible to create a stream wrapper in PHP (I thought it was only available with a C extension). It's pretty straightforward to create the wrapper. Of course it's only an approach. We can create more functionality to our stram wrapper but at least this example meets my needs.
His wrapper uses a client from his Nov framework to open the stream to the given path and gives read and write methods to work with the data inside the database. Code for the wrapper class is included as well as a bit of example code showing how it can be used with the custom stream protocol. You can find the complete code here.
voice your opinion now!
couchdb stream wrapper database tutorial
Gonzalo Ayuso's Blog: Using a stream wrapper to access CouchDb attachments with PHP
by Chris Cornutt September 06, 2010 @ 08:15:22
In his continuing look at using CouchDb as a file system, Gonzalo Ayuso has posted this third part in the group of articles about using streams to connect your scripts to the database instance.
I'm still working in my filesystem with CouchDb. After creating a library to enable working with PHP and CouchDB (see the post here), and after using Monkey Patching to override standard PHP's filesystem functions. I've created another solution now. Thanks to a comment in my last post (many thanks Benjamin) I've discovered that it's possible to create a stream wrapper in PHP (I thought it was only available with a C extension).
He includes the code for the stream connection wrapper, a pretty simple script that parses the string it's given and opens a read/write stream to the source. There's also a "url_stat" method that will return to you the size of the stream in bytes. Then you just register the wrapper and go about your normal file system calls to use the CouchDb directly.
voice your opinion now!
couchdb stream wrapper attachment tutorial
Gonzalo Ayuso's Blog: Using Monkey Patching to store files in CouchDb using the standard filesystem
by Chris Cornutt September 02, 2010 @ 14:10:12
Gonzalo Ayuso takes his "CouchDb as a filesystem" approach one step further (see the previous post about it here) with this new post talking about monkey patching to store files into the CouchDb server using the normal PHP file handling functions.
Since PHP5.3 a new design pattern is available for us: Monkey Patching. With this pattern we can override PHP's core functions with a home-made functions in a different namespace (another example here). That's means if I have fopen function in the above example, PHP uses the filesystem function "fopen" but if we set a namespace in our example, PHP will search first the function within the current namespace.
By defining the new interface inside of a namespace (with functions to override the default PHP file handlers) you can have the rest of the code call the same functions (fopen, fread, etc) but they'll do different things. In this case it handles them as push and pull to the CouchDb instead of the normal filesystem. You can grab the source for this example here.
voice your opinion now!
monkeypatching namespace filesystem couchdb tutorial
Gonzalo Ayuso's Blog: Using CouchDb as filesystem with PHP
by Chris Cornutt September 01, 2010 @ 13:41:12
In a new post to his blog Gonzalo Ayuso shows an interesting use for the CouchDB tool - using it as a filesystem for cross-server handling of things like images or other binary resources.
One of the problems I need to solve in my clustered PHP applications is where to store files. When I say files I'm not speaking about source code. I'm speaking about additional data files, such as download-able pdfs, logs, etc. Those files must be on every node of the cluster. [...] CouchDb has two great features to meet or requirements with this problem. It allows us to store files as attachments and it also allows to perform a great and very easy multi-master replica system.
He shows how use two libraries he's created to connect to the CouchDB instance and, based on this structure, be able to insert the content - a text file in this case - pull it back out, get the meta data about it and even move it to another location in the structure.
voice your opinion now!
couchdb filesystem tutorial binary file
|
Community Events
Don't see your event here? Let us know!
|